mirror of
https://github.com/maputnik/editor.git
synced 2026-08-25 14:37:27 +00:00
Added default support to <EnumInput/>
This commit is contained in:
@@ -29,13 +29,13 @@ class EnumInput extends React.Component {
|
|||||||
if(options.length <= 3 && optionsLabelLength(options) <= 20) {
|
if(options.length <= 3 && optionsLabelLength(options) <= 20) {
|
||||||
return <MultiButtonInput
|
return <MultiButtonInput
|
||||||
options={options}
|
options={options}
|
||||||
value={value}
|
value={value || this.props.default}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
/>
|
/>
|
||||||
} else {
|
} else {
|
||||||
return <SelectInput
|
return <SelectInput
|
||||||
options={options}
|
options={options}
|
||||||
value={value}
|
value={value || this.props.default}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user