react-jsonschema-form
react-jsonschema-form copied to clipboard
Array defaults don't work at the root of the schema.
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.21.2
Current Behavior
Array defaults don't work at the root of the schema.
Expected Behavior
Array defaults should work at the root of the schema and not only when it's nested.
Steps To Reproduce
- Click here open the demo with array at the root of the schema
- You'll notice that defaults are not applied.
- Click here to open the demo with nested array.
- You'll notice that defaults are applied when the array is nested and not at the root of the schema.
Environment
- OS: macOS
- Node: 22.1.0
- npm: 10.7.0
Anything else?
No response