react-jsonschema-form
react-jsonschema-form copied to clipboard
Live validation / onChange errors issue
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.x
Current Behavior
when schema contains if/then/else and a user's changes activates then/else subschemas, the live validation works but errors in the onChange event are not reflect the real ones
Expected Behavior
errors in the onChange event should always reflect the form state
Steps To Reproduce
Thus, open the repo https://github.com/AlimovSV/rjsf-onchange-issue and click checkbox, you will see error message in the UI but console.log in the onChange event handler displays empty array:
Next uncheck the checkbox you will see that form becomes valid but console log displays errors from the previous form state:
Environment
- OS:
- Node:
- npm:
Anything else?
No response