Use of dependencies in oneOf
General information
- json-editor version: 2.15.1
Expected behavior
When selecting the receiver between LOW/HIGH, I would expect the corresponding "band" and "bands" arrays to switch to the appropriate one. I would not expect the oneOf to be presented as a selectable option.
Actual behavior
Switching the receiver does not change the "band" or "bands" arrays.
Steps to reproduce the behavior
Your band definitions are basically the same for high and low, so the editor (and validator) does not know which one to pick and that itself is an error, which "bubbles up".
I changed your definitions like so (high bands have values 2 and 3):
"band.high": {
"title": " ",
"type": "integer",
"enum": [
2,
3
],
"options": {
"enum_titles": [
"0 1000MHz",
"1 5000MHz"
]
}
},
See example
Next thing is, that dependencies are not working with oneOf, they're rather meant to be used on a property directly. CC: @germanbisurgi
You should give if-then-else a try to change just the enum titles, it should be feasible; but the schema is tricky :) If not the problems must be split into smaller parts to debug them.
PS: Do you expect that all dropdowns change their titles, when you change the receiver?