Skip to content

Commit f999547

Browse files
author
kevinq.qk
committedFeb 2, 2019
Fixed a bug.The selector have a empty option, when use enum and the default value is 0 or false or ''.
1 parent 174e136 commit f999547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/components/widgets/SelectWidget.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function SelectWidget(props) {
9191
const newValue = getValue(event, multiple);
9292
onChange(processValue(schema, newValue));
9393
}}>
94-
{!multiple && !schema.default && <option value="">{placeholder}</option>}
94+
{!multiple && schema.default === undefined && <option value="">{placeholder}</option>}
9595
{enumOptions.map(({ value, label }, i) => {
9696
const disabled = enumDisabled && enumDisabled.indexOf(value) != -1;
9797
return (

0 commit comments

Comments
 (0)
Please sign in to comment.