Skip to content

Commit

Permalink
fix: edit-profile-modal should not unregister
Browse files Browse the repository at this point in the history
  • Loading branch information
chertik77 committed Dec 26, 2024
1 parent 212caf8 commit 3425061
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/features/user/components/modals/EditProfileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ export const EditProfileModal = () => {

const { mutate: editProfile, isPending } = useEditProfile()

const { handleSubmit, register, formState, reset, watch } =
useAppForm(EditUserSchema)
const { handleSubmit, register, formState, reset, watch } = useAppForm(
EditUserSchema,
{ shouldUnregister: false }
)

const { isFormReadyForSubmit } = useIsFormReadyForSubmit(
{ name, email, password: undefined },
Expand Down

0 comments on commit 3425061

Please sign in to comment.