Skip to content

Commit

Permalink
FIX: Fixed resetForm function dependency issue (#3872)
Browse files Browse the repository at this point in the history
Closes: #3861

As i mentioned in the issue section that the unexpected behaviour is comming while using resetForm function due to missing dependency. Here is the fix.
  • Loading branch information
rajpatelbot authored Aug 31, 2023
1 parent 41720c2 commit 5c01ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/formik/src/Formik.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export function useFormik<Values extends FormikValues = FormikValues>({
dispatchFn();
}
},
[props.initialErrors, props.initialStatus, props.initialTouched]
[props.initialErrors, props.initialStatus, props.initialTouched, props.onReset]
);

React.useEffect(() => {
Expand Down

1 comment on commit 5c01ee7

@vercel
Copy link

@vercel vercel bot commented on 5c01ee7 Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

formik-docs – ./website

formik-docs-formik.vercel.app
formik-docs-git-main-formik.vercel.app
www.formik.org
formik.org
formik-docs.vercel.app

Please sign in to comment.