mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 16:31:16 +01:00
Added default support to <EnumInput/>
This commit is contained in:
parent
392a845460
commit
8c760bb810
1 changed files with 2 additions and 2 deletions
|
@ -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}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue