r5n-labs/react-native-otp-inputs

handleChange function is not being called.

quanle1994 opened this issue · 7 comments

Hi @dsznajder
I think there is a regression bug with the handleChange callback function after the recent changes.
Previously, the handleChange function will be triggered after every input change, but now, it is not called even when the full OTP has been entered.
image
In this screenshot, the GO button is not enabled when all the inputs are entered but previously, it was.
image
When I try to log the changes, nothing was shown.

Version: 4.0.0-alpha.1 and 4.0.0-alpha.2

Same here, So changed to some other Package

@quanle1994 In few minutes I will release newest alpha, please checkout if everything works for you :) I'm also working on better docs and migration guide for v4 version.

@axebelk v4 is in alpha, you can use v3 if something is not working correctly until v4 will be stable :)

Now it should be called properly. Checkout react-native-otp-inputs@next

Still not working properly.. have lot of bugs

@axebelk could you share your code and version which you use? Are you sure you have installed 4.0.0-alpha.4 version?

I am sure I have installed alpha-4
"react-native-keyevent": "^0.2.2",
"react-native-otp-inputs": "^4.0.0-alpha.4",
and my code is

<OtpInputs
keyboardType="number-pad"
handleTextChange={code => console.log(code)}
selectTextOnFocus={false}
numberOfInputs={6} />

When i starting to type it stay on first input box.

@axebelk iOS or Android? Also, did you setup properly react-native-keyevent for android? We are using this module on our production app, and everything seems to be working fine :/