We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
IMO Bug ;-)
Calling resetForm without nextValues causing that dirty stay equal to true, because this.initialValues is not updated.
resetForm
nextValues
dirty
true
this.initialValues
resetForm should also reset this.initialValues so dirty flag will be equal to false after reset.
false
change this 3 lines https://github.com/jaredpalmer/formik/blob/master/src/formik.tsx#L574-L576
if (nextValues) { this.initialValues = nextValues; }
on this
this.initialValues = nextValues ? nextValues : this.props.initialValues;
The text was updated successfully, but these errors were encountered:
Yeah I think you are right. Can you submit a PR with a test?
Sorry, something went wrong.
Yep, will do, thank you
Successfully merging a pull request may close this issue.
Bug, Feature, or Question?
IMO Bug ;-)
Current Behavior
Calling
resetForm
withoutnextValues
causing thatdirty
stay equal totrue
, becausethis.initialValues
is not updated.Desired Behavior
resetForm
should also resetthis.initialValues
sodirty
flag will be equal tofalse
after reset.Suggested Solutions
change this 3 lines https://github.com/jaredpalmer/formik/blob/master/src/formik.tsx#L574-L576
on this
The text was updated successfully, but these errors were encountered: