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

Autofocus first input when clear otp input #263

Open
junghyeonsu opened this issue Dec 4, 2020 · 5 comments
Open

Autofocus first input when clear otp input #263

junghyeonsu opened this issue Dec 4, 2020 · 5 comments
Labels
Needs more information The description in the issue doesn't sufficiently describe the problem/feature request.

Comments

@junghyeonsu
Copy link

junghyeonsu commented Dec 4, 2020

I want autofocus first input when click clear buttton.
because i use this library as password input.

image
when click clear button...

image

i think shouldAutoFocus works same what i need.
but i don't know how to autofocus when i clicked clear button.
If it doesn't matter, can I take on this issue?

@junghyeonsu junghyeonsu changed the title autofocus first input when clear otp input Autofocus first input when clear otp input Dec 5, 2020
@shivakrishna17
Copy link

Did u found any solution for this??....As i am creating an application, when the user enters invalid input, i am setting it to empty, but the autoFocus is staying at last box.

@blactrojan
Copy link

#306 (comment)

You can use this snippet and implement a similar one, just change focusInput to 0 and it should work

@ritikbanger

This comment was marked as spam.

@prateek3255 prateek3255 added the Needs more information The description in the issue doesn't sufficiently describe the problem/feature request. label Mar 25, 2023
@imran-yasin
Copy link

simple use this line
renderInput={(props) => <input autoFocus {...props} />}

@prodigiousabyss
Copy link

It's not working for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs more information The description in the issue doesn't sufficiently describe the problem/feature request.
Projects
None yet
Development

No branches or pull requests

7 participants