Closed michailbrynard closed 5 months ago
Thanks for pointing out! Will soon add Vitest for these edge cases. (input value is uncontrolled, but onChange is provided, therefore the logic was wrong to think onChange was a setter since there is no state/control at all)
Great, thanks for the quick fix! I tested again and it's working now.
As soon as I add an onChange handler, the OTP input stops working (i.e. no digits appear when i type).
This is my code:
The OTP input works without
onChange={(code) => { console.log(code) }}
, but when I add it, all the input boxes remain empty as I type.