jsonforms
jsonforms copied to clipboard
Optional enums do not have a blank option
Describe the bug
Given the following json schema:
{
"type": "object",
"required": [
"property1"
],
"properties": {
"property1": {
"type": "number"
},
"property2": {
"type": "number"
},
"property3": {
"$ref": "#/definitions/Property3Types"
}
},
"definitions": {
"Property3Types": {
"enum": [
"Type1",
"Type2",
"Type3"
],
"type": "string"
}
},
"additionalProperties": false
}
property3 does not have an option for "nothing".
Expected behavior
I would expect property3 to inherently have an option to select "blank", as it is an optional property.
Steps to reproduce the issue
Use the given json schema to generate a form.
Screenshots
No response
In which browser are you experiencing the issue?
Brave 1.60.58
Which Version of JSON Forms are you using?
v3.1.0
Framework
Core
RendererSet
Vanilla
Additional context
Not sure if this is actually a bug, or I am just missing an option to enable this!
Hi @elliotdes,
It works for me with both, the React Vanilla and Vue Vanilla renderer sets:
Is handing over the JSON Schema all you do?