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 Autofocus Keyboard not opening #171

Open chinmayeedevi opened 2 years ago

chinmayeedevi commented 2 years ago

If i set OTPInputView to autofocus then keyboard not opening but when i set it to false it is working, but I need to on autofocus. what should I do Please if any one have solution for that please help me. thanks in advance

sharmadevs commented 2 years ago

componentDidMount() {
setTimeout(() => { this.otpInput.focusField(0) }, 500); } <OTPInputView ref={input => this.otpInput = input} pinCount={4} autoFocusOnLoad={false} onCodeFilled={((code) => { console.log(code) })} />

LeapfrogNihar commented 2 years ago

Thanks @sharmadevs

shubhamsurvev2stech commented 2 years ago

Not Working for me

timothyerwin commented 1 year ago

this is actually covered in one of the closed tickets...you need to call Keyboard.dismiss() before showing the otp screen.