Skip to content

Commit

Permalink
👮‍♀️ close #11954 getFieldState remove unnessaried inValidating and t…
Browse files Browse the repository at this point in the history
…ouched subscription (#11995)

* 👮‍♀️ close #11954 getFieldState remove unnessaried inValidating and touched subscription

* revert touched field state
  • Loading branch information
bluebill1049 committed Jun 8, 2024
1 parent f13f060 commit 1d0503b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logic/createFormControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,9 @@ export function createFormControl<
) => ({
invalid: !!get((formState || _formState).errors, name),
isDirty: !!get((formState || _formState).dirtyFields, name),
isTouched: !!get((formState || _formState).touchedFields, name),
isValidating: !!get((formState || _formState).validatingFields, name),
error: get((formState || _formState).errors, name),
isValidating: !!get(_formState.validatingFields, name),
isTouched: !!get((formState || _formState).touchedFields, name),
});

const clearErrors: UseFormClearErrors<TFieldValues> = (name) => {
Expand Down

0 comments on commit 1d0503b

Please sign in to comment.