[v2] Allow nesting of field groups

未关闭
#2,363 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

首先跟踪 defineFieldGroup 背后的 v2 核心类型,尤其是父字段和子表单 prop 的类型定义方式。在 TypeScript 检查中复现嵌套组示例,然后确认子字段组可以接受父字段而不会产生类型错误,并且现有的字段组行为保持不变。

由索引模型根据 Issue 内容生成。

描述

area: runtime scope: core type: enhancement v2
Describe the bug

In v2, a field group cannot be composed inside another field group.

The parent only exposes fields, but the child requires a form prop. Passing form={fields} causes a TypeScript error. In v1, this worked with form={group}.

Your minimal, reproducible example

N/A - this is a question about the core

Steps to reproduce
  1. Create a child field group with defineFieldGroup.
  2. Render it inside another field group.
  3. Pass the parent fields using form={fields}.
  4. TypeScript reports incompatible types.
Expected behavior

Nested field groups should be composable

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

N/A

TanStack Form adapter

None

TanStack Form version

v2.0.0-alpha.2

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 摘要。