Skip to content
Source
Sign inSign up
TanStack/form

Regression: onSubmit can be invoked concurrently while a submission is in progress (v1.33.1) #2279

Openkthoring(GitHub profile, opens in a new tab) opened this issue 0 comments

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

  1. Click Submit.
  2. 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

  1. LeCarbonator(GitHub profile, opens in a new tab) added labelsv2: needs investigation

Sign in to join this conversation.