devfolioco / react-otp-input

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

Not Working On Enter Key #270

Closed ghost closed 3 years ago

ghost commented 3 years ago
littlefinger42 commented 3 years ago

Wrap your OtpInput in a <form> element with onSubmit, then use <Button type="submit"/>

https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event

ghost commented 3 years ago

Totally cool done it already. anyway thanks for helping

On Fri, Apr 9, 2021, 3:56 PM Laurie Copley @.***> wrote:

Wrap your OtpInput in a

element with onSubmit, then use <Button type="submit"/>

https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devfolioco/react-otp-input/issues/270#issuecomment-816600508, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALOCRY4E3ZC5VEG47KOWIVLTH3MNRANCNFSM4XWBRMCQ .

apollonian commented 3 years ago

Happy to help with other questions you may have!

denishrana09 commented 3 years ago

Wrap your OtpInput in a <form> element with onSubmit, then use <Button type="submit"/>

https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event

For those, who don't want to show the button, simply add css, display: none to the button