-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Internal submitForm
implementation does not throw errors
#1636
Comments
would also expect to work this way and be able to catch submit failures with |
Can u submit a pr? |
@andrewMuntyan you want to contribute or I'll do it? (more likely next week) |
@slorber I'll try to make it faster. Check this issue next week. If there is no PR, pls make it happen :) |
andrewMuntyan
pushed a commit
to andrewMuntyan/formik
that referenced
this issue
Jun 26, 2019
… chain if handleSubmit has returned rejected Promise
andrewMuntyan
pushed a commit
to andrewMuntyan/formik
that referenced
this issue
Jun 26, 2019
… chain if handleSubmit has returned rejected Promise. logs removed
andrewMuntyan
pushed a commit
to andrewMuntyan/formik
that referenced
this issue
Jun 26, 2019
… chain if handleSubmit has returned rejected Promise. typo
i've made related PR - #1637 Also, my CodeSandBox example was not correct, so I've fixed it. |
andrewMuntyan
pushed a commit
to andrewMuntyan/formik
that referenced
this issue
Jun 27, 2019
… chain if handleSubmit has returned rejected Promise. Throw originally throwed error
jaredpalmer
pushed a commit
that referenced
this issue
Jun 27, 2019
* feature #1636 - submitForm helper should not brake promise chain if handleSubmit has returned rejected Promise * feature #1636 - submitForm helper should not brake promise chain if handleSubmit has returned rejected Promise. logs removed * feature #1636 - submitForm helper should not break promise chain if handleSubmit has returned rejected Promise. typo * feature #1636 - submitForm helper should not break promise chain if handleSubmit has returned rejected Promise. Throw originally throwed error
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🚀 Feature request
Catch errors thrown from
onSubmit
inside of form/fields componentsCurrent Behavior
Formik Internal implementation of
submitForm
does not throw any errors.It is not possible to get in
catch
hook with the following example:Here is a sandbox exaple
Desired Behavior
Have the ability to catch errors which are thrown from
onSubmit
method passed to formik as a propSuggested Solution
Who does this impact? Who is this for?
This is a cool additional feature for all users. In this way, internal
submitForm
method (which could be used inside component ) will completely implement Promise interface.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: