Skip to content

useFieldArray using Controller #1796

Answered by eden-lane
eden-lane asked this question in Q&A
Discussion options

You must be logged in to vote

I saw an example for Field Arrays using Controller but I thought it's not what I am looking for because it logged same broken results:

{
  at: "", 
  fieldc2404ed0-a817-11ea-be06-3baf40d1ed0d: "c2404ed0-a817-11ea-be06-3baf40d1ed0d", 
  fieldc2b9eba0-a817-11ea-be06-3baf40d1ed0d: "c2b9eba0-a817-11ea-be06-3baf40d1ed0d"
}

actually the example itself is broken. 55's line should be

name={`field[${item.id}].value`}

instead of

name={`field${item.id}`}

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@talhabalaj
Comment options

@eden-lane
Comment options

@talhabalaj
Comment options

@bluebill1049
Comment options

@xolesteroll
Comment options

Answer selected by eden-lane
Comment options

You must be logged in to vote
1 reply
@eden-lane
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants