Skip to content

Commit

Permalink
Set initialValues if values passed to resetForm() (jaredpalmer#197)
Browse files Browse the repository at this point in the history
Related to jaredpalmer#195 .
  • Loading branch information
jaredpalmer authored Oct 5, 2017
1 parent 4727f03 commit 284345e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/formik.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand Down

0 comments on commit 284345e

Please sign in to comment.