mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
chore: sync frontend/src/_ui/Select/SelectComponent.jsx with main branch
This commit is contained in:
parent
0868447e92
commit
a442207a6e
1 changed files with 5 additions and 5 deletions
|
|
@ -31,11 +31,11 @@ export const SelectComponent = ({ options = [], value, onChange, closeMenuOnSele
|
|||
Array.isArray(options) && options.length === 0
|
||||
? options
|
||||
: options?.map((option) => {
|
||||
if (!option.hasOwnProperty('label')) {
|
||||
return _.mapKeys(option, (value, key) => (key === 'value' ? key : 'label'));
|
||||
}
|
||||
return option;
|
||||
});
|
||||
if (!option.hasOwnProperty('label')) {
|
||||
return _.mapKeys(option, (value, key) => (key === 'value' ? key : 'label'));
|
||||
}
|
||||
return option;
|
||||
});
|
||||
|
||||
const currentValue = value ? selectOptions.find((option) => option.value === value) || value : defaultValue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue