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] Reset isDirty correctly #106

Merged
merged 2 commits into from
Apr 18, 2023
Merged

[Fix] Reset isDirty correctly #106

merged 2 commits into from
Apr 18, 2023

Conversation

joaom00
Copy link
Member

@joaom00 joaom00 commented Apr 16, 2023

This PR introduces a new parameter for setValue function to not run validations / set isDirty when value change.

My concern here is that this will become public. Should I change it?

Closes #104

@joaom00 joaom00 requested a review from crutchcorn April 16, 2023 02:35
@joaom00 joaom00 changed the title [Fix] Reset isDirty correctly [WIP] [Fix] Reset isDirty correctly Apr 16, 2023
@joaom00 joaom00 changed the title [WIP] [Fix] Reset isDirty correctly [Fix] Reset isDirty correctly Apr 16, 2023
__isResetting: boolean;
};

const isInternal = (value: any): value is InternalValue => {
Copy link
Member

Choose a reason for hiding this comment

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

GREAT usage of a manual type guard!

@crutchcorn crutchcorn merged commit 94d5aab into main Apr 18, 2023
@crutchcorn crutchcorn deleted the fix-isdirty-reset branch April 18, 2023 17:25
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.

[Bug]: isDirty does not work properly after clearing fields / after reset
2 participants