-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fixes 1295 Duplicate Error Messages for Anyof/Oneof #3795
fix: Fixes 1295 Duplicate Error Messages for Anyof/Oneof #3795
Conversation
@cwendtxealth Can you post before/after Screenshots of the differences caused by the change? |
…xealth/react-jsonschema-form into fixes-1295-duplicate-anyof-errors
Simulate.submit(node); | ||
|
||
const matches = node.querySelectorAll('form .form-group .form-group .text-danger'); | ||
expect(matches).to.have.length.of(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before fix matches would have length 2
@cwendtxealth @heath-freenome This fix has caused an issue of Select components in antd, chakra-ui, and semantic theme packages that will not be validated. |
@dashdots can you create a new issue? |
Reasons for making this change
Fixes #1295, For anyOf/oneOf error messages were being shown at the top level anyOf/oneOf schema and the child schema that was resolved from the anyOf/oneOf logic. This PR updates SchemaField to only show error message at the child schema.
Checklist
npm run test:update
to update snapshots, if needed.