Open options on focus
See original GitHub issueFor context:
I am using this component in a form. When clicking a label in a form the expected behavior is that the corresponding input gets the focus. This can be achieved by adding inputProps: {id: 'someId'}
to the select component.
Now, using this behavior I need the options menu to open when the component gets focus this way. If I understand the component correctly this is currently not possible. It was a simple change locally but I haven’t made a PR yet, as I’m not even sure if this is behavior you want to support.
(Also somewhat relevant: getting focus by clicking the corresponding label only works if the component is searchable since it doesn’t render an input field to reference if it isn’t. This probably needs its own issue though)
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to open option list of HTML select tag on onfocus()
in your code you can place this code select id = "demo2" with this code select id = "demo2" onfocus="myFunction(this) fore highlight your...
Read more >Use Focus on your iPhone or iPad - Apple Support
Go to Settings > Focus. · Tap the Add button , then tap Custom or browse additional options. · Enter a name for...
Read more >HTMLElement.focus() - Web APIs | MDN
The HTMLElement.focus() method sets focus on the specified element, if it can be focused. The focused element is the element that will ...
Read more >Set Focus on <select> Element on Page Load - EncodeDna.com
The <select> element, as you know, provides a menu of options. It's a dropdown list. In many occasions, you might wish to set...
Read more >Focus option - Unpoly
Pass a CSS selector string to focus a matching element. From JavaScript you may also pass the Element object that should be focused....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SachaG
I think you meant
openMenuOnFocus={true}
.openOnFocus
is not any option.Just wanted to say this seems fixed? I was able to get it to work with
openOnFocus={true}
. I think this is a good option to have because it might not be obvious that there are options to pick from otherwise.