Closed AJAYK-01 closed 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.
So the value field could be non inputtable at all right?, Like showing only the value and not allowing any inputs.
What does this PR do? This PR fixes a minor bug in the DEMO index.js, where in, even if isInputNum is checked, the value text field on the left side of the page accepts Non Digits, and also changes the OTP field accordingly
Any background context you want to provide? the pr just removes the non digits with simple regex when isInputNum is checked