diff --git a/src/core/json-schema-components.jsx b/src/core/json-schema-components.jsx index 421ac3fa706..4c5556f8b02 100644 --- a/src/core/json-schema-components.jsx +++ b/src/core/json-schema-components.jsx @@ -320,18 +320,16 @@ export class JsonSchema_boolean extends Component { let { getComponent, value, errors, schema, required, disabled } = this.props errors = errors.toJS ? errors.toJS() : [] let enumValue = schema && schema.get ? schema.get("enum") : null - if (!enumValue) { - // in case schema.get() also returns undefined/null - enumValue = fromJS(["true", "false"]) - } + let allowEmptyValue = !enumValue || !required + let booleanValue = !enumValue && fromJS(["true", "false"]) const Select = getComponent("Select") return (