Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the same behavior in the resetForm as a formik v1. #2205

Merged
merged 1 commit into from
Jan 28, 2020
Merged

Adds the same behavior in the resetForm as a formik v1. #2205

merged 1 commit into from
Jan 28, 2020

Conversation

krailler
Copy link
Contributor

See issue #2034

In formik v1, resetForm use the initialValues from props, you can see here https://github.com/jaredpalmer/formik/blob/version-1.5.8/src/Formik.tsx#L532

In this case, I cannot use directly prop.initialValues, because the resetForm is a memorize callback and in some cases will not work properly (even adding as deps).

If you have another idea to get back the v1 behavior, feel free to comment, please 🤗

@vercel
Copy link

vercel bot commented Jan 14, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/jared/formik-docs/3rtdh8xuu
✅ Preview: https://formik-docs-git-fork-krailler-master.jared.now.sh

@jaredpalmer
Copy link
Owner

@krailler thanks! taking a peek now

@krailler
Copy link
Contributor Author

Hi @jaredpalmer any news? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants