Skip to content

[v2] Allow nesting of field groups #2363

Description

@viniciusbitt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: runtimeThis issue affects the runtime of the library.scope: coreThis issue affects the core package, meaning any adapter is also affected by it.type: enhancementThis requests an enhancement to existing behaviour.v2This issue affects v2 as well.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions