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

Get new dirtyFields when reset keeping defaults and dirty values #11401

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

IanVS
Copy link
Contributor

@IanVS IanVS commented Jan 16, 2024

Fixes #11386

I'm not positive this is the best way to do this, but it seems to work, tests pass, and it works in my app without breaking anything else.

Copy link

codesandbox bot commented Jan 16, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

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

Awesome! thanks @IanVS. LGTM. This marks the day we turn issues to 0 again.

@bluebill1049 bluebill1049 merged commit 4c21b28 into react-hook-form:master Jan 16, 2024
7 checks passed
@IanVS
Copy link
Contributor Author

IanVS commented Jan 16, 2024

It has always impressed me that you stay anywhere near 0 open issues.

rafaelcalhau pushed a commit to rafaelcalhau/react-hook-form that referenced this pull request May 5, 2024
…defaults and dirty values (react-hook-form#11401)

* Add test

* Get newly-dirty fields when keeping defaults and dirty values
@IanVS IanVS deleted the dirty-values-make-dirty branch May 22, 2024 19:51
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.

issue: dirtyFields is incorrect when reset() with keepDefaultValues and keepDirtyValues
2 participants