Skip to content
Source
Sign inSign up
TanStack/form

[v2] Allow nesting of field groups #2363

Openviniciusbitt(GitHub profile, opens in a new tab) opened this issue 0 comments

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

  1. LeCarbonator(GitHub profile, opens in a new tab) added labelstype: enhancement

  2. LeCarbonator(GitHub profile, opens in a new tab) added labelsscope: core

  3. LeCarbonator(GitHub profile, opens in a new tab) added labelsarea: runtime

Sign in to join this conversation.