From 5c01ee77b312ff6c375d43f841fe9fbe5846ebd9 Mon Sep 17 00:00:00 2001 From: Raj Patel <83405614+rajpatelbot@users.noreply.github.com> Date: Fri, 1 Sep 2023 01:55:06 +0530 Subject: [PATCH 1/3] FIX: Fixed resetForm function dependency issue (#3872) 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. --- packages/formik/src/Formik.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/formik/src/Formik.tsx b/packages/formik/src/Formik.tsx index db627821d..cd17adcd4 100755 --- a/packages/formik/src/Formik.tsx +++ b/packages/formik/src/Formik.tsx @@ -417,7 +417,7 @@ export function useFormik({ dispatchFn(); } }, - [props.initialErrors, props.initialStatus, props.initialTouched] + [props.initialErrors, props.initialStatus, props.initialTouched, props.onReset] ); React.useEffect(() => { From 0e476bdf860e48237b5e0e226412edc253590b40 Mon Sep 17 00:00:00 2001 From: vennilamahalingam <33494788+vennilamahalingam@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:34:35 +0530 Subject: [PATCH 2/3] To fix the navbar highlight. (#3856) https://github.com/jaredpalmer/formik/issues/3854 --- website/src/pages/docs/[...slug].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/docs/[...slug].tsx b/website/src/pages/docs/[...slug].tsx index 314b5f7d2..2394029a2 100644 --- a/website/src/pages/docs/[...slug].tsx +++ b/website/src/pages/docs/[...slug].tsx @@ -223,7 +223,7 @@ function SidebarRoutes({ const href = '/docs/[...slug]'; const pagePath = removeFromLast(path!, '.'); const pathname = addTagToSlug(pagePath, tag); - const selected = slug.startsWith(pagePath); + const selected = (slug === pagePath); const route = { href, path, title, pathname, selected }; return ( Date: Sat, 2 Sep 2023 06:11:26 -0600 Subject: [PATCH 3/3] Fix deprecated type in React 18 (#3547) Replace StatelessComponent by FunctionComponent in withFormik.tsx fix #3546 PR to solve the problem with the removed type in react 18 I saw that you have a build/types branch, but it hasn't changed since 2020, so I did the direct PR in master