Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I type OTP and select a middle number to remove and clean it using delete button, the number jumps to previous fields. #297

Open
linco6054 opened this issue Jun 15, 2022 · 0 comments

Comments

@linco6054
Copy link

is there a way i can only delete the focused input box ?
My code

<OtpInputs
autoFocus={false}
defaultValue={value}
style={styles({ theme, colorMode }).main}
inputContainerStyles={styles({ theme, colorMode }).inputContainerStyles}
inputStyles={styles({ theme, colorMode }).inputStyles}
autofillFromClipboard={true} // auto fill from sms
keyboardType="phone-pad"
focusStyles={
isInvalid
? styles({ theme, colorMode }).error
: styles({ theme, colorMode }).focusStyles
}
handleChange={code => {
resetErrorState();
if (code.match(/^[0-9]*$/)) {
setValue(code);
}
}}
numberOfInputs={CELL_COUNT}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant