devfolioco / react-otp-input

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

fix value field taking non digits on isInputNum #245

Closed AJAYK-01 closed 3 years ago

AJAYK-01 commented 4 years ago
apollonian commented 3 years ago

Since isInputNum only prevents any non-numeric values from being entered in the inputs of the OTP component, changing the way value field works in the demo seems inappropriate as the component does not actually control the type of "value" being programatically passed to it. The value field demonstrates the data handling of a controlled component.

AJAYK-01 commented 3 years ago

So the value field could be non inputtable at all right?, Like showing only the value and not allowing any inputs.