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

fix: manually track the dirty state #128

Conversation

logaretm
Copy link
Member

@logaretm logaretm commented Feb 7, 2025

What

This changes how we track the dirty state by tracking it similarly to touched and disabled. Previously we were computing if the current value(s) match the original value(s) for fields/groups/forms.

While the new approach is prone to bugs or the state going out of sync, it is more efficient, and is more reliable around field arrays and nested fields.

This still doesn't expose mutating it directly to the developer.

@logaretm logaretm linked an issue Feb 7, 2025 that may be closed by this pull request
Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: a165ebe

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

This PR includes changesets to release 1 package
Name Type
@formwerk/core Patch

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

@logaretm logaretm self-assigned this Feb 7, 2025
@logaretm logaretm merged commit 3c955de into main Feb 7, 2025
3 checks passed
@logaretm logaretm deleted the 127-dirty-tracking-doesnt-work-without-setting-initial-form-values branch February 7, 2025 21:34
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.

Dirty tracking doesn't work without setting initial form values.
1 participant