Skip to content

Commit

Permalink
馃悶 fix #11922 keep dirty on reset with dirty fields (#11958)
Browse files Browse the repository at this point in the history
* 馃悶 fix #11922 keep dirty on reset with dirty fields

* prettier
  • Loading branch information
bluebill1049 committed Jun 1, 2024
1 parent aff0bb9 commit e9f6ddb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/logic/createFormControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,8 @@ export function createFormControl<
: _formState.dirtyFields
: keepStateOptions.keepDefaultValues && formValues
? getDirtyFields(_defaultValues, formValues)
: keepStateOptions.keepDirty
? _formState.dirtyFields
: {},
touchedFields: keepStateOptions.keepTouched
? _formState.touchedFields
Expand Down

0 comments on commit e9f6ddb

Please sign in to comment.