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

オープン
#1,833 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #1971 @tt-a1i による — マージされずにクローズ

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

src/index.tsx にあるリンク先の StackBlitz reproduction から始め、500 ms の debounce を含む onChange/onChangeAsync の検証フローを追跡します。同期検証の完了から非同期検証の開始までの状態遷移を確認します。完了の条件は、その間ずっと isValidating が true のままであるか、置き換え後の状態が一貫して公開されることです。

索引モデルが issue の本文から書いたものです。

説明

v1 v2: needs investigation
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

主要言語
TypeScript
スター
6.8k
フォーク
717
平均マージ
5日 22時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/form のほかの issue

TanStack/form の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。