How can we pass from object and it's type to child ?
i have to dynamiclly generate from based on user input so i need to pass
from object
currently i m doing
from:any which works but reactive is not working
thanks please help me9 Replies
harsh-harlequin•5mo ago
what is the structure of that dynamic form?
automatic-azureOP•5mo ago
harsh-harlequin•5mo ago
so you have a big form that has
productsVariantsSchema as its structure.
You want to split off parts of the form (the variant) and generate it once per item in the array.
The way to do that would be using withForm in Form Composition
You would have a structure like:
automatic-azureOP•5mo ago
oh so this is the way i will try this and let you know
it would be better if this in doc
automatic-azureOP•5mo ago
oh got it
https://tanstack.com/form/latest/docs/framework/react/guides/form-composition#breaking-big-forms-into-smaller-pieces
this is i need to follow
thanks
Form Composition | TanStack Form React Docs
A common criticism of TanStack Form is its verbosity out-of-the-box. While this can be useful for educational purposes helping enforce understanding our APIs it's not ideal in production use cases. As...
harsh-harlequin•5mo ago
also,
as const is important for the namespace. See this as example
automatic-azureOP•5mo ago
okay let me try this
can we pass
sharedFormOptions(isEdit) as i m doing same form for edit and create
and pass default valuesharsh-harlequin•5mo ago
withForm expects exactly the same form
grouping fields for multiple forms is not implemented yet. There is a PR ready, but it is not released yetautomatic-azureOP•5mo ago
oh okay thanks
i will check this later becouse now react-hook-from does the job for now