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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manually calling formik.submitForm() resolves with undefined #2057
Comments
The issue I just had with this function was the promise not being rejected when the form is invalid. The docs say this: The promise will be rejected if form is invalid. I'm trying to figure out how to take action after an invalid submit without watching all the Formik state flags changing. |
Also run into that, for anyone looking for a temp workaround: |
Fixed in 2.1 |
I still experienced with the issues I don't know what is wrong |
I experienced the issues too |
Also getting |
Same, since combinedErrors is not an Error it doesn't throw. |
re-opening as one more issue is reported - #2831 |
there is still no solution for that =0_0= |
Running into this issue as well |
Is there a workaround? |
Has a workaround or fix been found for this? |
I faced the same problem and got it fixed with my own workaround. I am validating and submitting the form on a manual click: In a nutshell:
formRef.current.values gives me all the values of form. If you are not aware, read it here on how to access Formik properties using useRef: |
馃殌 Feature request
Current Behavior
Calling
formik.submitForm()
promise manually, resolves always withundefined
regardless of what my handler returns.Desired Behavior
I'd like this to be resolved with the return value of my submit handler so I can decide what to do next.
https://codesandbox.io/s/inspiring-fog-9pmo8
The text was updated successfully, but these errors were encountered: