Skip to content

Conversation

@heath-freenome
Copy link
Member

@heath-freenome heath-freenome commented Oct 22, 2025

Reasons for making this change

Added support to make live validate and live omit work during the onBlur phase rather than onChange

  • In @rjsf/core:
    • Updated FormProps to add new onChange/onBlur values for the liveValidate and liveOmit props, deprecating the boolean aspect of them
    • Updated Form to support the new feature to do onBlur handling of liveValidate and liveOmit
    • Updated the tests to verify the new behavior
  • Updated the playground to switch liveValidate and liveOmit from checkboxes to radio buttons for the new options
  • Updated form-props.md and v6x upgrade guide.md to document the new feature and deprecation
  • Updated the CHANGELOG.md accordingly

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Updated playground controls:

Screenshot 2025-10-22 at 11 43 16 PM

@heath-freenome heath-freenome self-assigned this Oct 22, 2025
@heath-freenome heath-freenome marked this pull request as draft October 22, 2025 01:59
@heath-freenome heath-freenome force-pushed the live-omit-validate-blur branch from 8ad2870 to e98ce8d Compare October 22, 2025 16:59
Added support to make live validate and live omit work during the `onBlur` phase rather than `onChange`
- In `@rjsf/core`:
  - Updated `FormProps` to add new `onChange`/`onBlur` values for the `liveValidate` and `liveOmit` props, deprecating the `boolean` aspect of them
  - Updated `Form` to support the new feature to do `onBlur` handling of `liveValidate` and `liveOmit`
  - Updated the tests to verify the new behavior
- Updated the playground to switch `liveValidate` and `liveOmit` from checkboxes to radio buttons for the new options
- Updated `form-props.md` and `v6x upgrade guide.md` to document the new feature and deprecation
- Updated the `CHANGELOG.md` accordingly
@heath-freenome heath-freenome force-pushed the live-omit-validate-blur branch from e98ce8d to a5202c6 Compare October 22, 2025 17:01
@heath-freenome heath-freenome marked this pull request as ready for review October 23, 2025 06:44
@@ -3716,13 +3719,192 @@ describeRepeated('Form common', (createFormComponent) => {
});
});

describe('Form omitExtraData and liveOmit', () => {
describe('Live validation onBlur', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one set of new tests


describe('omitExtraData and live omit onBlur', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the other set of new tests


describe('Form omitExtraData and liveOmit', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything else from here down is just a reorganization. Hiding whitespace will help reduce a lot of changed lines

@nickgros nickgros merged commit eb7e928 into rjsf-team:main Oct 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants