How to manually focus input inside a predefined useFieldArray #1775
-
I have a verification code input which is separated on 6 inputs. I am using useFieldArray to create my 6 inputs and every input is declared as . But how can I focus an input referenced in its controller? My scenario is that I have to focus the next input everytime the current focused input its value is entered by the user. PS: I am using functional components using useFormContext and useFieldArray hooks |
Beta Was this translation helpful? Give feedback.
Answered by
bluebill1049
Jun 4, 2020
Replies: 1 comment 6 replies
-
i would just use |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
foubei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i would just use
useForm
and store all of theirref
s, https://react-hook-form.com/faqs#Howtosharerefusage