Hi, I am trying to use "oneOf" of type "boolean". However, oneOf with type:"boolean" does not support properties on selection, works if I use "object" - see here
I want a behaviour that supports collapsible field on toggle to make my form less convoluted, I'm open to workarounds or suggestions. Many thanks in advance.
Expand and show additional properties when I set toggle to true
Additional properties/schemas did not show when I set toggle to true
v1.6.1
That's not a valid schema for oneOf. Since the type of the entire form is "boolean", it's not possible to store properties in it unless the type of the form is "object".
You might want to check out the "Schema dependencies" example for something closer to what you want: https://react-jsonschema-form.readthedocs.io/en/latest/dependencies/#dynamic
Thanks @epicfaace , had a look at your suggestion and came up with this which is pretty much what I want.
Sample here
Will close this now!
Most helpful comment
Thanks @epicfaace , had a look at your suggestion and came up with this which is pretty much what I want.
Sample here
Will close this now!