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

未關閉
#1,833 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

  • #1971 來自 @tt-a1i —— 已關閉,未合併

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
react, typescript
領域
frontend

研究方向

從 src/index.tsx 中連結的 StackBlitz reproduction 開始,追蹤 onChange/onChangeAsync 的驗證流程,包括 500 ms 的 debounce。確認同步驗證完成與非同步驗證開始之間的狀態轉換;完成的標準是 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 小時
30 天內合併 PR
14

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TanStack/form 的其他 Issue

查看 TanStack/form 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。