How can we use useFieldArray for one particular field from a set of schema. #8119
Unanswered
nishantkhandelwal
asked this question in
Ideas
Replies: 1 comment 6 replies
-
Consider providing a codesanbox example to expand on what you want to achieve. All RHF hooks expect the |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @bluebill1049 ,
There is a use case that I am struggling with in my project where we have a page that collects firstname(string), lastname(string), addresses(array of object and dynamic).
On this page user can add/remove addresses.
I have defined a schema for the page that looks like
{
firstName: string,
lastName: string,
address: {
postcode: string,
country: string
}
}
on the page I want to use useFieldArray for the address field only. How can I pass the control specific to the address field to the useFieldArray.
Or is there any other way for dealing the complex form pages like this ?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions