You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I pass a default value to a field, and set disabled={false}, the field is set to dirty once I hit submit.
Expected behavior 🤔
The field should not be dirty.
This appears to be to do with some changes made in react-hook-form 7.54.2 (downgrading the react-hook-form version to 7.54.1 in the first codesandbox below will remove the bug), however I can't reproduce the issue using only react-hook-form alone.
Duplicates
Latest version
Current behavior 😯
When I pass a default value to a field, and set disabled={false}, the field is set to dirty once I hit submit.
Expected behavior 🤔
The field should not be dirty.
This appears to be to do with some changes made in react-hook-form 7.54.2 (downgrading the react-hook-form version to 7.54.1 in the first codesandbox below will remove the bug), however I can't reproduce the issue using only react-hook-form alone.
Code Sandbox link: https://codesandbox.io/p/sandbox/eager-nash-xfx65h
Code Sandbox link (vanilla react-hook-form): https://codesandbox.io/p/sandbox/react-hook-form-submit-only-dirty-fields-forked-7pc7cp?workspaceId=ws_N9E86iuTTak73hgeXgKfX3
The text was updated successfully, but these errors were encountered: