Open
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.8.0
Current Behavior
Given a schema:
{
"type": "object",
"required": [
"root"
],
"properties": {
"root": {
"type": "object",
"properties": {
"arrayProp": {
"type": "array",
"items": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"default": "abc"
}
]
}
}
}
}
}
}
Pressing the "Add" button of arrayProp
does nothing.
If I specify "default": null
in items
, the add button works. I would expect it to default to the first item, which rjsf does if an anyOf/oneOf
is not an array item.
Expected Behavior
A new item is created, defaulting to the first value of "anyOf" (null).
Steps To Reproduce
See playground link
Environment
- OS:
- Node:
- npm:
Anything else?
No response