Async initial array values are not set when form.Field is conditionally rendered
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- react, typescript
- 領域
- frontend
研究方向
從 StackBlitz 專案中的最小重現開始,尤其關注 src/index.tsx,並比較受影響版本 1.32.0/1.33.0 與 1.31.0 之間的行為。重現條件式載入狀態,並驗證在渲染 form.Field 時非同步解析的陣列會出現,而不需要再新增其他人員。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
Until version 1.31.0, it's been possible to set async initial values that are in the form of an array, where the form.Field that displays the array is conditionally rendered. In version 1.33.0, this does not seem to work anymore (it was broken from version 1.32.0). This bug is pretty similar to the issue I reported a couple of weeks ago, where the difference is that I now conditionally render the form.Field that displays the array. The use case for this, is showing a loading UI while the async data is fetched. It was concluded in my previous issue that it was a regression from https://github.com/TanStack/form/pull/2172, so I assume the same goes for this new issue.
Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-form-ehnyffpx?file=src%2Findex.tsx
Steps to reproduce
- Open the StackBlitz
- Notice that no person is displayed after 3 seconds, when the async state is updated and the loading UI disappears
- You may click the "Add person"-button to notice that there suddenly is 2 people in the list
Expected behavior
I would expect the form.Field to render the array when the async data is resolved and the form.Field is displayed.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
TanStack Form adapter
react-form
TanStack Form version
1.33.0 (from 1.32.0)
TypeScript version
6.0.3
Additional context
No response
- 主要語言
- TypeScript
- 星號
- 6.8k
- 分支
- 705
- 平均合併
- 1 天 12 小時
- 30 天內合併 PR
- 14
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TanStack/form 的其他 Issue
-
`isDefaultValue` is wrong when a field-level `defaultValue` is `null`可能已有人在做 @fenet-as 於 22 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
Async validator doesn't re-trigger `isValidating` after first failed validation可能已有人在做 @drewsephski 於 26 天前認領。 未關閉
難度 2/5 1-2 天 新手友好度 72/100
維護者通常 1 天內回覆
-
[v2 alpha] devtools are always light mode可能已有人在做 @dikshit-n 於 60 天前認領。 未關閉area: runtime scope: devtools type: bug v2
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
FormGroupApi.getRelatedFields and FieldApi.validate() use unguarded startsWith for group membership, matching unrelated fields with a shared name prefix可能已有人在做 @HDPark95 於 79 天前認領。 未關閉area: runtime scope: core type: bug v1
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
FormApi: onSubmit/onServer error cleared on any non-matching validation cause, not just 'change'可能重新可做 關聯的 PR 已關閉且未合併。 未關閉v1 v2: needs investigation
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 88/100
-
bug needs triage
難度 2/5 1-3 小時 新手友好度 72/100
DSpace/dspace-angular#6511 ·
維護者通常 1 天內回覆
-
area: frontend area:byok bug severity:low
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
Phone app shows Unknown for a remote machine whose key changed可能已有人在做 @janicduplessis 今天認領。 未關閉area: mobile priority: P3 type: bug
難度 1/5 1 小時以內 新手友好度 78/100
appandflow/stim#5006 · 1 則留言 ·
維護者通常 1 天內回覆
-
Area - Local to Cloud Bug
難度 2/5 1-3 小時 新手友好度 66/100
microsoft/vscode-mssql#23209 ·
維護者通常 1 天內回覆