shubhanus / otp-input-react

React simple otp input with react hooks
MIT License
59 stars 86 forks source link

Added type="button" to ResendOTP button in ResendOTP.js #31

Closed patilkrunal closed 2 years ago

patilkrunal commented 3 years ago

Resend OTP refreshes the form in which this component is included. adding type button to the element so as not to refresh the form and keep the form data intact till new otp is received and submitted.

Tested and adding type="button" to element and calling onResendClick={sendOTP} does not refresh the page.