Skip to content

Commit

Permalink
🐞 fix #11922 keep dirty on reset with dirty fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Jun 1, 2024
1 parent aff0bb9 commit 1d0ffe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logic/createFormControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ export function createFormControl<
: _formState.dirtyFields
: keepStateOptions.keepDefaultValues && formValues
? getDirtyFields(_defaultValues, formValues)
: {},
:keepStateOptions.keepDirty ? _formState.dirtyFields: {},

Check failure on line 1310 in src/logic/createFormControl.ts

View workflow job for this annotation

GitHub Actions / build

Replace `keepStateOptions.keepDirty·?·_formState.dirtyFields` with `·keepStateOptions.keepDirty⏎········?·_formState.dirtyFields⏎········`
touchedFields: keepStateOptions.keepTouched
? _formState.touchedFields
: {},
Expand Down

0 comments on commit 1d0ffe1

Please sign in to comment.