Skip to content

Commit

Permalink
👹 close #11778 improve unregister omit key with getValues method (#11779
Browse files Browse the repository at this point in the history
)
  • Loading branch information
bluebill1049 committed Apr 14, 2024
1 parent 541d41f commit 7cdad77
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/logic/createFormControl.ts
Expand Up @@ -870,8 +870,7 @@ export function createFormControl<
| ReadonlyArray<FieldPath<TFieldValues>>,
) => {
const values = {
..._defaultValues,
...(_state.mount ? _formValues : {}),
...(_state.mount ? _formValues : _defaultValues),
};

return isUndefined(fieldNames)
Expand Down

0 comments on commit 7cdad77

Please sign in to comment.