Added default support to <EnumInput/>

This commit is contained in:
orangemug 2019-10-16 10:12:59 +01:00
parent 392a845460
commit 8c760bb810

View file

@ -29,13 +29,13 @@ class EnumInput extends React.Component {
if(options.length <= 3 && optionsLabelLength(options) <= 20) {
return <MultiButtonInput
options={options}
value={value}
value={value || this.props.default}
onChange={onChange}
/>
} else {
return <SelectInput
options={options}
value={value}
value={value || this.props.default}
onChange={onChange}
/>
}