TanStackT
TanStack10mo ago
3 replies
dry-scarlet

How to use form composition ui component blocks for subfields

I follow examples and its straightforward and nice to be able to reuse declare field components, like field.TextField etc, but in the example again, its not certain how to use those ui components for subfields when form has array fields.

const field = useFieldContext<string>()

this will get whole field and not subfields, I tried to pass FieldApi as param but it'll create a lot of generic type thing.
So my question is how should I use ui components i registered for composition in array subfields
Was this page helpful?