In my opinion, field “fieldForOther” with label “If other:” should not be initially displayed.
If I un-select checkbox “Other”, input “If other”: disappears. If I select it once again, input is displayed, so it works. But it does not work initially.
schema:
{
"type": "object",
"additionalProperties": false,
"properties": {
"someArray": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [ "A", "B", "Other" ]
}
},
"fieldForOther": {
"type": "string"
}
}
}
uischema
{
"type": "Categorization",
"elements": [
{
"label": "Some Form",
"type": "Category",
"elements": [
{
"label": "Some Form",
"type": "Group",
"elements": [
{
"scope": "#/properties/someArray",
"label": "Select at least one",
"type": "Control"
},
{
"scope": "#/properties/fieldForOther",
"label": "If other",
"options": {
"multi": true,
"minRows": 3
},
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/someArray",
"schema": {
"contains": {
"const": "Other"
}
}
}
},
"type": "Control"
}
]
}
]
}
]
}