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
Maybe related to #3367 but hard to say without being able to see the custom template code.
@AshleyHolton Can you provide us with a reproducible example? Without that there is not really anyway to fix this otherwise
This issue has been automatically marked as possibly close because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.
This issue was closed because of lack of recent activity. Reopen if you still need assistance.