-
A boolean to trigger “SHOW” a multi-select arrary.
-
User select “foo” checkbox. It should “SHOW” a textfield below the multi-select array.
schema.json
{
"type": "object",
"properties": {
"boolean":{
"type":"boolean"
},
"multiEnum": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"foo",
"bar",
"foobar"
]
}
},
"textField":{
"type":"string"
}
}
}
uiSchema.json
{
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/boolean"
},
{
"type": "Control",
"scope": "#/properties/multiEnum",
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#properties/boolean",
"schema": {
"const": true
}
}
}
},
{
"type": "Control",
"scope": "#/properties/textField",
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#properties/multiEnum",
"schema": { "enum": ["foo"] }
}
}
}
]
}