-
-
Notifications
You must be signed in to change notification settings - Fork 598
Closed
Description
Describe the bug
I am trying to hook API Errors with @tanstack/form.
I thought I could set the error in an ErrorMap on the onSubmit key as it revalidates when the form is actually submitted, but I guess I'm missing something.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/qg7yvw
Steps to reproduce
- Click the Login button
- Notice the API Error which comes from some API Error
canSubmitis now false and there is no way to submit the form again without changing a value of any input.
Expected behavior
I expect to be able to submit the form when it has an onSubmit error so that it can be re-validated by the submission.
This error comes from something that might not be related to the form values itself (i.e. a Network Error or an other error during the process of the request even if the fields are valid). I still want to add the error to the form errors, but be able to re-submit immediately.
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
- MacOS
- Arc
TanStack Form adapter
react-form
TanStack Form version
v0.41.0
TypeScript version
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels