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
Change isSubmitting
behaviour to mimic v1
#1987
Change isSubmitting
behaviour to mimic v1
#1987
Conversation
I agree that the lack of docs around this change was definitely unfortunate but it does appear to fix a longstanding issue (#486) that prevented chaining functions onto That being said, the above only applies to returning a promise from |
c31a1aa
to
ae48d6d
Compare
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/jared/formik-docs/398l3myot |
@AllenAnthes yeah, the promise behaviour could certainly be kept as well in this PR. I've updated it accordingly. |
@Tigge, Who can we contact to merge this? Is there a way I could fix this myself by editing my local Formik files? Sorry for the dumb question, I am a noob x) |
@rofazayn that's @jaredpalmer - I'm sure he'll get around to addressing this eventually. For now, if you want to test, you might be able to do it using https://docs.npmjs.com/files/package.json#git-urls-as-dependencies by point to my branch. |
Why it is not yet merged? I think everyone's form is working fine. |
In version 2 the behaviour of isSubmitting was changed from having the user handle its state after submitting to always resetting it to false after the onSubmit handler had returned (or it's promise). This adds back to the version 1 behaviour of not touching the isSubmitting state after the onSubmit handler has been called if we don't return a promise in the onSubmit handler. Solves: jaredpalmer#1957
ae48d6d
to
2028d93
Compare
In version 2 the behaviour of
isSubmitting
was changed from having theuser handle its state after submitting to always resetting it to false
after the
onSubmit
handler had returned (or it's promise). This revertsit back to the version 1 behaviour of not touching the
isSubmitting
state after the
onSubmit
handler has been called.Solves: #1957