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

can pass ref to Input nor set autofocus #1205

Open
cocodrino opened this issue Jul 27, 2020 · 2 comments
Open

can pass ref to Input nor set autofocus #1205

cocodrino opened this issue Jul 27, 2020 · 2 comments
Labels

Comments

@cocodrino
Copy link

What problem does this feature solve?

I want to set focus on an input programmatically, this could be done if input would accept a ref or even better if input provide some kind of functionality for this

@ricardocanelas
Copy link

ricardocanelas commented Mar 4, 2021

Yes, you can set a ref to an input.
Use the inputRef prop to ref.

Example:

<Input inputRef={myRef} />

or

<FormControl inputRef={myRef} name="firstname" />

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants