form icon indicating copy to clipboard operation
form copied to clipboard

when debouceAsync is present, isValidating should still be true in time between sync finishing, and async starting

Open neronim1141 opened this issue 2 months ago • 0 comments

Describe the bug

Im trying to make a form, where part of the validation is done on server, so im using both, onChange and onChangeAsync, the later with onChangeAsyncDemounceMs set to 500.

I noticed that in the time frame between onChange finishing and OnChangeAsync starting I do not have a way to disable submit button, as isValidating is set to true after onChange

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-form-db1bcvv7?file=src%2Findex.tsx

Steps to reproduce

  1. fill firstname with 'er" - button is dissabled
  2. fill firstname with 'error'- button is enabled (onChange passed) and after 500 s (the onChangeAsync fires) the button is disabled again

Expected behavior

When any debouceMs is set, the isValidating should still stay as true, or we should get additional property which would represent that period of time.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

MacOs, chrome

TanStack Form adapter

react-form

TanStack Form version

1.23.7, 1.23.8

TypeScript version

No response

Additional context

No response

neronim1141 avatar Oct 30 '25 14:10 neronim1141