Skip to content

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

@neronim1141

Description

@neronim1141

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions