react-jsonschema-form
react-jsonschema-form copied to clipboard
onAddClick creating and immediately removing array item
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?
other
Version
5.x
Current Behavior
Hi,
Currently using custom templates and everything works fine, however when I attempt to add a new array element via onAddClick, I see the flash of the item being added and then being immediately removed.
Reordering and delete buttons work fine so the formData is being dealt with correctly. It's just onAddClick that's a problem.
It's also odd that onChange is called 6 times when the button is clicked.
Expected Behavior
A new item should be added to the array and onChange called once.
Steps To Reproduce
No response
Environment
No response
Anything else?
No response