Open combobox on focus #1270
jorenvanhee
started this conversation in
Ideas
Replies: 1 comment
-
Just saw there's already a discussion open for this (#1236), this one can be deleted :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like show the combobox options when the input field is focused. This gives the users a visible cue with the available options before they start typing.
I tried implementing this myself using
onFocus
andonBlur
onCombobox.Input
, combined withstatic
Combobox.Options
.https://stackblitz.com/edit/react-stebo6?file=src/App.js
Everything looks fine at first, but when you click an option, it doesn't get selected.
I think the issue is that the component gets re-rendered when the focus changes. By that time
open
is alreadyfalse
and the click never happens. Not sure if this is an Idea or a Bug, but I think it could be useful for more people.Beta Was this translation helpful? Give feedback.
All reactions