Ordering of schema-depended fields
See original GitHub issuePrerequisites
- I have read the documentation;
- In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
Description
Hello there, thank you for the great work on this project. I am exploring the use of schema dependencies but I encounter a trouble in ordering the depended fields. I created a minimal example here: https://codesandbox.io/s/8kw2wq6z08
In this example, there are two selects. When every of them is selected “yes”, a depended field will be triggered to display. So “Select A” triggers “Textbox A” and “Select B” triggers “Textbox B”.
What I am trying to achieve is an ordering of “Select A”, “Textbox A”, “Select B”, “Textbox B”, but setting ui:order as is (you can modify the uiSchema to uiSchema_not_working) will throw the following error:
Invalid root object field configuration:uiSchema order list contains extraneous properties
If there is a way to correctly define the ordering, could you please kindly inform?
Copy-paste the schema here:
{
"type": "object",
"properties": {
"Show first name?": {
"type": "string",
"enum": ["yes", "no"]
},
"Show family name?": {
"type": "string",
"enum": ["yes", "no"]
}
},
"dependencies": {
"Show first name?": {
"oneOf": [{
"properties": {
"Show first name?": {
"enum": ["yes"]
},
"First name": {
"type": "string"
}
}
}, {
"properties": {
"Show first name?": {
"enum": ["no"]
}
}
}]
},
"Show family name?": {
"oneOf": [{
"properties": {
"Show family name?": {
"enum": ["yes"]
},
"Family name": {
"type": "string"
}
}
}, {
"properties": {
"Show family name?": {
"enum": ["no"]
}
}
}]
}
}
}
The uiSchema I was trying to set:
{
"ui:order": ["Show family name?", "Family name", "Show first name?", "First name"]
}
Version
React 16.0.0 react-jsonschema-form latest
Issue Analytics
- State:
- Created 6 years ago
- Reactions:13
- Comments:12 (5 by maintainers)

Top Related StackOverflow Question
You can use a wildcard like this:
@Pruxis This wildcard: (1) cannot define the order of undefined ones; (2) requires that all undefined ones are grouped together in display.