Open junghyeonsu opened 3 years ago
Did u found any solution for this??....As i am creating an application, when the user enters invalid input, i am setting it to empty, but the autoFocus is staying at last box.
https://github.com/devfolioco/react-otp-input/issues/306#issuecomment-1160417780
You can use this snippet and implement a similar one, just change focusInput to 0 and it should work
The feature is available in: https://www.npmjs.com/package/react18-input-otp
simple use this line renderInput={(props) => <input autoFocus {...props} />}
It's not working for me.
I want autofocus first input when click
clear
buttton. because i use this library as password input.when click
clear
button...i think
shouldAutoFocus
works same what i need. but i don't know how to autofocus when i clickedclear
button. If it doesn't matter, can I take on this issue?