rjsf-team/react-jsonschema-form
View on GitHuboneOf nested objects/arrays with default values not using default values after changing between oneOf's
Open
#4,476 opened on Jan 31, 2025
bughelp wanted
Repository metrics
- Stars
- (13,175 stars)
- PR merge metrics
- (Avg merge 3d 17h) (32 merged PRs in 30d)
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- 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.24.2
Current Behavior
Nested objects, arrays and arrays of objects in oneOf objects are not using default values set to them when changing to another oneOf object.
Expected Behavior
Default values should be applied to nested objects, arrays, arrays of objects when switching from one oneOf to another.
Steps To Reproduce
- Open this react-jsonschema-form playground link
- Change between different
oneOf's (Test1, Test2, Test3) - Fields
arr,runnerandrunnersshould be updating when changing between theoneOf's
Environment
- OS: Windows 10, Ubuntu 20.04, 22.04, 24.04
- Node: 22.12.0, 20.12.2
- npm: 10.9.0
Anything else?
No response