Skip to content
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

Add component to disable validation updates #9

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

Alduino
Copy link
Member

@Alduino Alduino commented Nov 4, 2023

This PR adds a new component, <NoValidationUpdates>. Any calls to useValidationUpdate or useInputValidity in children of the component are ignored.

The use-case of this component is for composite form fields that have their own validity, independent of the validity of any of the child fields. The expected behaviour here is that the useValidityUpdate call in the composite form field overwrites that of the children, but in reality it doesn't. So, this component acts as a way to turn off the child fields’ validation to prevent any weirdness.

@Alduino Alduino added the enhancement New feature or request label Nov 4, 2023
@Alduino Alduino self-assigned this Nov 4, 2023
Copy link

changeset-bot bot commented Nov 4, 2023

🦋 Changeset detected

Latest commit: afd5dc4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@radiantguild/form-contexts Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 5, 2023

size-limit report 📦

Path Size
dist/index.js 1.99 KB (+2.68% 🔺)

@Alduino Alduino merged commit 406614f into master Nov 5, 2023
1 check passed
@Alduino Alduino deleted the disable-validation-updates branch November 5, 2023 03:25
@github-actions github-actions bot mentioned this pull request Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants