`withFieldGroup` array handling with nested
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
从链接的 CodeSandbox 复现开始,重点关注在上下移动嵌套数组值时的 withFieldGroup 和 SingleFieldWithReorder 组件。追踪渲染出的嵌套值为何与父数组映射不一致,并检查是否应将 fields 和 form 暴露给 render 函数。当嵌套组保持同步,并且 render props 的行为得到解决或记录时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
When combining the withFieldGroup for a complex array handling, the nested array element seems out of sync with the actual value of the group.
I've just tested while passing the root form to the SingleFieldWithReorder and the nested elements keep being out of sync (regarding the json value displayed)
Also, this is unrelated but when looking at the extra props of the render function, it seems to pass the fields and the form. Idk if this is expected or if the props must be sanitized when rendering to remove theses values before passing the props to the render method. (They are undocumented and not typed)
Your minimal, reproducible example
https://codesandbox.io/p/devbox/misty-monad-8t29lx?workspaceId=ws_PkVpfRWHUp5vMscgD59gVj
Steps to reproduce
- Try to move the value with the
move down|move upbuttons. - See that the values from the base array mapping are correct, but the values rendered in the element aren't.
Expected behavior
I think the nested group value should remain sync with the array mapping from the parent group
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- Browser: Tested on chrome 138.0.7204.183 (Official Build) (64-bit)
TanStack Form adapter
react-form
TanStack Form version
v1.15.1
TypeScript version
No response
Additional context
No response
- 主要语言
- TypeScript
- 星标
- 6.8k
- 派生
- 711
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/form 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
[v2] FieldWithValue<T> erases field.name to any instead of string可能已有人在做 @Priyeshshrivastav 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
`isDefaultValue` is wrong when a field-level `defaultValue` is `null`可能已有人在做 @fenet-as 于 25 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
Async validator doesn't re-trigger `isValidating` after first failed validation可能已有人在做 @drewsephski 于 30 天前认领。 未关闭
难度 2/5 1-2 天 新手友好度 72/100
维护者通常 1 天内回复
-
[v2 alpha] devtools are always light mode可能已有人在做 @dikshit-n 于 64 天前认领。 未关闭area: runtime scope: devtools type: bug v2
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
pending close triaging
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#62582 · 1 条评论 ·
维护者通常 1 天内回复
-
feature request
难度 2/5 1-3 小时 新手友好度 72/100
callstack/react-native-paper#5189 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
live-codes/livecodes#1079 · 1 条评论 ·
维护者通常 1 天内回复
-
Add: ESP 2 RO未关闭approved check:passed streams:add
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复