Async initial array values are not set when form.Field is conditionally rendered
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với bản tái hiện tối thiểu trong dự án StackBlitz, đặc biệt là src/index.tsx, và so sánh hành vi giữa các phiên bản bị ảnh hưởng 1.32.0/1.33.0 và 1.31.0. Tái hiện trạng thái tải có điều kiện và xác minh rằng mảng được phân giải bất đồng bộ xuất hiện khi form.Field được render, mà không cần thêm một người khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 6.7k
- Fork
- 691
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/form
-
[v2] `field.replaceValue` is missing from `form.FieldArray`Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea: runtime scope: core type: bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Async validator doesn't re-trigger `isValidating` after first failed validationCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[v2 alpha] devtools are always light modeCó thể đã có người làm @dikshit-n đã nhận 30 ngày trước. Đang mởarea: runtime scope: devtools type: bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
FormGroupApi.getRelatedFields and FieldApi.validate() use unguarded startsWith for group membership, matching unrelated fields with a shared name prefixCó thể đã có người làm @HDPark95 đã nhận 49 ngày trước. Đang mởarea: runtime scope: core type: bug v1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TanStack/form#2337 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FormApi: onSubmit/onServer error cleared on any non-matching validation cause, not just 'change'Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởv1 v2: needs investigation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TanStack/form
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
prime-radiant-inc/evener#3726 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
FuRongJun-1999/dsh-memory#56 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pingdotgg/t3code#15682 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openwatersio/slackwater.xyz#152 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] 请修改标题为您遇到的问题Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OpenListTeam/OpenList-Worker#103 ·
Maintainer thường phản hồi trong vòng 1 ngày