Skip to content

Commit

Permalink
Fixed a bug.The selector have a empty option, when use enum and the d…
Browse files Browse the repository at this point in the history
…efault value is 0 or false or ''.
  • Loading branch information
kevinq.qk committed Feb 2, 2019
1 parent 174e136 commit f999547
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/widgets/SelectWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function SelectWidget(props) {
const newValue = getValue(event, multiple);
onChange(processValue(schema, newValue));
}}>
{!multiple && !schema.default && <option value="">{placeholder}</option>}
{!multiple && schema.default === undefined && <option value="">{placeholder}</option>}
{enumOptions.map(({ value, label }, i) => {
const disabled = enumDisabled && enumDisabled.indexOf(value) != -1;
return (
Expand Down

0 comments on commit f999547

Please sign in to comment.