Possible to retrieve the index along with data from handleSubmit(onSubmit)? #2078
Answered
by
bluebill1049
michaeljblum
asked this question in
Q&A
-
I've got a dropdown (select/option) whose items are dynamically generated with data. Like so:
(I know I shouldn't be setting the key as index - changed it from actual val for this example) I'd like to retrieve the index of the Any help would be super appreciated, thanks (and thanks for this awesome library!!!) |
Beta Was this translation helpful? Give feedback.
Answered by
bluebill1049
Jul 6, 2020
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
michaeljblum
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
index
&value
and then useController
to collect valueregister
atuseEffect
andsetValue
atonChange