react-jsonschema-form
react-jsonschema-form copied to clipboard
schema with "oneOf" and default value - acts weird
Prerequisites
- [X] I have searched the existing issues
- [X] I understand that providing a SSCCE example is tremendously useful to the maintainers.
- [X] I have read the documentation
- [X] Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.x
Current Behavior
When using oneOf
in schema with default value you need to select oneOf option twice to actually do the change.
First click removes default value, and second does switch:
https://github.com/rjsf-team/react-jsonschema-form/assets/11699084/c57df349-33ab-4a65-978c-f3056fc00e6d
Expected Behavior
Switch should happen after first click
Steps To Reproduce
See playground.
Environment
- OS: MacOS, Chrome
- Node: v20.2.0
- npm: 10.2.4
Anything else?
No response
@aodinok Wow, that is weird. Given that we only have a few volunteers who work a few hours a week on this, do you think you can provide a fix for us?