Hi all,
Is it possible to render a group of radio buttons for which the displayed options depend on the value of another control?
So in my schema I have a “gender” and a “name”:
"gender": {
"type": "string",
"oneOf": [
{"const": "male", "title": "Male"},
{"const": "female", "title": "Female"}
]
},
"name": {
"type": "string",
"oneOf": [
{"const": "Alice", "title": "Alice"},
{"const": "Bob", "title": "Bob"},
{"const": "Clair", "title": "Clair"},
{"const": "David", "title": "David"}
]
}
uiSchema:
{
"type": "Control",
"scope": "#/properties/gender",
"options": { "format": "radio" }
},
{
"type": "Control",
"scope": "#/properties/name",
"options": { "format": "radio" }
}
So this will render
If I select “Male” I want only to display the names “Bob” and “David”.
What is the best way to do this?