react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Live validation / onChange errors issue

Open AlimovSV opened this issue 7 months ago • 5 comments

Prerequisites

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

AlimovSV avatar Jul 10 '24 12:07 AlimovSV