Describe the bug#
After upgrading to v1.33.1, it appears that onSubmit can be invoked multiple times while a previous submission is still pending.
In previous versions, clicking the submit button while a submission was already in progress would not invoke onSubmit again. After upgrading, each click results in another invocation of onSubmit, causing multiple concurrent submissions.
Your minimal, reproducible example#
https://codesandbox.io/p/sandbox/nostalgic-brook-w68c8p
Steps to reproduce#
- Click Submit.
- Before the 2-second onSubmit promise resolves, click Submit several more times.
Expected behavior#
While a submission is in progress, subsequent clicks should not invoke onSubmit again. Only a single submission should be active at a time.
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
- OS: Windows
- Browser: Firefox
- Version: 154.0b7
TanStack Form adapter#
react-form
TanStack Form version#
1.33.1
TypeScript version#
v6.0.3
Additional context#
I believe this regression was introduced by #2120