We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It is not possible to call focus() method when you hav a ref to an Button component <Button ref={(button) => this.buttonRef=button} >Select All
This is a similar issue also solved for Input component: #1475
this.buttonRef.focus() --> send the focus to the button
Uncaught TypeError:this.buttonRef.focus is not a function
The text was updated successfully, but these errors were encountered:
I think focusing a Button is common enough that this makes sense to implement this. Thanks for the idea.
In the meantime, here's a workaround:
const $button = document.querySelector('#my-button') if ($button) $button.focus() <Button id='my-button' />
Sorry, something went wrong.
innerRef
No branches or pull requests
Steps
It is not possible to call focus() method when you hav a ref to an Button component
<Button ref={(button) => this.buttonRef=button} >Select All
This is a similar issue also solved for Input component:
#1475
Expected Result
this.buttonRef.focus() --> send the focus to the button
Actual Result
Uncaught TypeError:this.buttonRef.focus is not a function
The text was updated successfully, but these errors were encountered: