From 284345e5d8d1920bb410880ada626ea8f8a05e25 Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Thu, 5 Oct 2017 18:26:23 -0400 Subject: [PATCH] Set initialValues if values passed to resetForm() (#197) Related to #195 . --- src/formik.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/formik.tsx b/src/formik.tsx index ccb468b04..ca39eecbf 100644 --- a/src/formik.tsx +++ b/src/formik.tsx @@ -571,6 +571,10 @@ Formik cannot determine which value to update. For more info see https://github. }; resetForm = (nextValues?: any) => { + if (nextValues) { + this.initialValues = nextValues + } + this.setState({ isSubmitting: false, errors: {},