-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 doesn't work when "autofocus" property is changed. #1692
Comments
Could you explain you use case? |
This behavior also matches broader spec. In HTML and in React, it is intended that To focus your Select component, store its ref and call |
@acierto did you end up finding a solution to this, I just came to the same conclusion as you. |
So in my particular case, I was conditionally assigning the Ultimately in my case I think react-select's behavior is fine as it makes sense that |
@dwoowb As authors of this lib decided to do it only on mount I basically went with @nortonwong solution. And the answer on @cbergmiller question, I have the same user scenario as @dwoowb |
Hello - In an effort to sustain the We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version. If you feel this issue / pull request is still relevant and you'd like us to review it, please leave a comment and we'll do our best to get back to you. |
So basically autofocus is looking only at componentDidMount and never recalculated in componentDidUpdate
The text was updated successfully, but these errors were encountered: