Hello @sdirix ,
First of all, thank you so much for building such an awesome library. I’m using jsonforms 3.0.0 in one of my project and it seems like there is a bug. Please have a look at following JSON schema and it’s output from jsonforms:
{
"title": "oneOf Default Value",
"type": "object",
"oneOf": [
{
"title": "Tab 1",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Tab_1"
],
"default": "Tab_1",
"readOnly": true
}
},
"required": [
"type"
]
},
{
"title": "Tab 2",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Tab_2"
],
"default": "Tab_2",
"readOnly": true
}
},
"required": [
"type"
]
},
{
"title": "Tab 3",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Tab_3"
],
"default": "Tab_3",
"readOnly": true
}
},
"required": [
"type"
]
}
]
};
In above schmea, there are three tabs and each tab has type
as required field and a default
value. But for some reason only the first tab is displaying the default value. Rest two tabs are empty. And since it is readonly it is problematic that use cannot even change it by their own will.
Here is how tab 2 renders:
(Here, the type
field is empty - despite defining default
value in the schema)
Can you please confirm if there is anything wrong in the schema of it’s a but from jsonforms.
Thank you so much again for all the good work and help