devfolioco / react-otp-input

:heavy_check_mark: OTP Input Component for React
http://devfolioco.github.io/react-otp-input
MIT License
657 stars 425 forks source link

Auto focus the last input element #433

Open dimakruhlyi opened 8 months ago

dimakruhlyi commented 8 months ago

The current implementation includes shouldAutoFocus boolean props. The first input element is focused.

Could you add additional prop (or update the existing one) which allows to focus the last input element? It'd be useful for input autofill cases where the user can submit the form with "Enter" key (more user friendly).