mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
add text alignment option to dropdown (#2406)
This commit is contained in:
parent
4ff45bf024
commit
6547f862e5
2 changed files with 4 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ export const DropDown = function DropDown({
|
|||
component,
|
||||
}) {
|
||||
let { label, value, display_values, values } = properties;
|
||||
const { selectedTextColor, borderRadius, visibility, disabledState } = styles;
|
||||
const { selectedTextColor, borderRadius, visibility, disabledState, justifyContent } = styles;
|
||||
const [currentValue, setCurrentValue] = useState(() => value);
|
||||
|
||||
if (!_.isArray(values)) {
|
||||
|
|
@ -81,6 +81,7 @@ export const DropDown = function DropDown({
|
|||
...provided,
|
||||
height: height,
|
||||
padding: '0 6px',
|
||||
justifyContent,
|
||||
}),
|
||||
|
||||
singleValue: (provided, _state) => ({
|
||||
|
|
@ -117,6 +118,7 @@ export const DropDown = function DropDown({
|
|||
};
|
||||
return {
|
||||
...provided,
|
||||
justifyContent,
|
||||
height: 'auto',
|
||||
display: 'flex',
|
||||
flexDirection: 'rows',
|
||||
|
|
|
|||
|
|
@ -900,6 +900,7 @@ export const componentTypes = [
|
|||
visibility: { type: 'toggle', displayName: 'Visibility' },
|
||||
selectedTextColor: { type: 'color', displayName: 'Selected Text Color' },
|
||||
disabledState: { type: 'toggle', displayName: 'Disable' },
|
||||
justifyContent: { type: 'alignButtons', displayName: 'Align Text' },
|
||||
},
|
||||
exposedVariables: {
|
||||
value: null,
|
||||
|
|
|
|||
Loading…
Reference in a new issue