when debouceAsync is present, isValidating should still be true in time between sync finishing, and async starting
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 682
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 7
Description
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
- fill firstname with 'er" - button is dissabled
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction at src/index.tsx and trace the onChange/onChangeAsync validation flow, including the 500 ms debounce. Confirm the state transition between synchronous validation finishing and asynchronous validation starting; done means isValidating remains true throughout that interval or the replacement state is exposed consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100