tttstudios / react-native-otp-input

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

On android, otp not update when re-send code, it auto fill old OTP #155

Open thuynt99 opened 2 years ago

thuynt99 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

ashrystein commented 2 years ago

Try to clear the Clipboard after submitting your code like this:

import Clipboard from '@react-native-community/clipboard'

const onSubmit = () => { Clipboard.setString('') // your logic }