tttstudios / react-native-otp-input

Tiny Javascript library which provides an elegant UI for user to input one time passcode.
MIT License
530 stars 239 forks source link

Add ability / flag to ignore the clipboard / auto suggestions #98

Open jonocairns opened 4 years ago

jonocairns commented 4 years ago

Is your feature request related to a problem? Please describe. When running OTP multiple times, the user can see the previous code added (which is invalid as a suggestion for the 1 + N prompt)

Describe the solution you'd like It'd be nice to have an option to ignore suggestions (for iOS) and disable the automatic copy paste (android)

iOS fix could use <TextInput autoCorrect={false}/>

Android fix could just take down a flag like disableClipboardUse which will gate the use of the clipboard

Describe alternatives you've considered Note sure of a workaround for iOS but for android it is possible to clear the clipboard before/after the OTP is filled

tal32123 commented 4 years ago

+1

lpawa commented 3 years ago

+1

mirkos93 commented 2 years ago

+1