Hi, we're facing a potential bug, conditional select field seems not working on group arrays item:
{
"type": "object",
"additionalProperties": false,
"properties": {
"companies": {
"title": "Companies",
"type": "array",
"default": [],
"x-jsf-presentation": {
"inputType": "group-array",
"addFieldText": "Add company"
},
"items": {
"type": "object",
"properties": {
"company": {
"title": "Select Company",
"type": "string",
"description": "Choose a company",
"oneOf": [
{
"title": "Company1",
"const": "company1_id"
},
{
"title": "Company2",
"const": "company2_id"
}
],
"x-jsf-presentation": {
"inputType": "select",
"placeholder": "jsf_select_company"
}
},
"role": {
"title": "Role",
"description": "Choose a role based on the selected company",
"oneOf": [],
"x-jsf-presentation": {
"inputType": "select",
"placeholder": "jsf_select_roles"
}
}
},
"allOf": [
{
"if": {
"properties": {
"company": {
"const": "company1_id"
}
},
"required": [
"company"
]
},
"then": {
"properties": {
"role": {
"oneOf": [
{
"title": "admin",
"const": "admin"
},
{
"title": "user",
"const": "user"
}
],
"x-jsf-presentation": {
"inputType": "select"
}
}
},
"required": [
"role"
]
}
}
],
"required": [
"company",
"role"
]
}
}
},
"required": [
"companies"
]
}
Trying this json in playground you can see that selecting company1 the Role selector doesn't show any options.
The problem seems to be with the group arrays object, using the same selectors without group arrays works correctly, as you can see with this json:
{
"type": "object",
"additionalProperties": false,
"properties": {
"company": {
"title": "Select Company",
"type": "string",
"description": "Choose a company",
"oneOf": [
{
"title": "Company1",
"const": "company1_id"
},
{
"title": "Company2",
"const": "company2_id"
}
],
"x-jsf-presentation": {
"inputType": "select",
"placeholder": "jsf_select_company"
}
},
"role": {
"title": "Role",
"description": "Choose a role based on the selected company",
"oneOf": [],
"x-jsf-presentation": {
"inputType": "select",
"placeholder": "jsf_select_roles"
}
}
},
"allOf": [
{
"if": {
"properties": {
"company": {
"const": "company1_id"
}
},
"required": [
"company"
]
},
"then": {
"properties": {
"role": {
"oneOf": [
{
"title": "admin",
"const": "admin"
},
{
"title": "user",
"const": "user"
}
],
"x-jsf-presentation": {
"inputType": "select"
}
}
},
"required": [
"role"
]
}
}
],
"required": [
"company",
"role"
]
}
Hi, we're facing a potential bug, conditional select field seems not working on group arrays item:
Trying this json in playground you can see that selecting company1 the Role selector doesn't show any options.
The problem seems to be with the group arrays object, using the same selectors without group arrays works correctly, as you can see with this json: