Replies: 2 comments
-
I know i can manually iterate through all nested fields inside of |
Beta Was this translation helpful? Give feedback.
-
You can iterate two In the const { fields, append, remove, prepend } = useFieldArray({
control,
name: "institutions",
}); In the const { fields, remove, append } = useFieldArray({
control,
name: `institutions.${nestIndex}.assets`,
}); You might need to use In the codesandbox, if a user clicks the "Append nested" button, the nested array is appended. In the console, you can check all ![]() |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have form like:
I need to check if there is any edits in City Bank:
It works fine if i edit any of the nested fields, like
institutions.0.assets.1.amount
BUT: if i remove or add any field to any of
institutions.X.assets.X
, allinstitutions.X
become dirty, despite there is no changes in themformState.dirtyFields
will return that everything is dirty, but individual fields are NOT dirty:How do i check the individual dirty state of
institutions.0
, without being affected by fields number change in othersinstitutions.X
?Beta Was this translation helpful? Give feedback.
All reactions