Replies: 2 comments 10 replies
-
I have a similar setup. For me, changing the onKeyDown on the input works:
This solution does feel a bit hacky. When searching for a solution I did find 3 discussions about the same issue. Non with better (or any) solutions. So there are multiple people running into the same issue with disabling keyboard interaction on space. Related discussions: |
Beta Was this translation helpful? Give feedback.
9 replies
-
Could you not just use the Combobox component instead? https://headlessui.com/react/combobox It provides much the same functionality as the Listbox, but with the ability to search / filter results. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all. I've added a filter input inside the
ListBox
so that users can type to filter items. It will be common for them to type then enter "space" but keyboard interaction is causing an issue:I'd like to prevent the dropdown from closing when the space bar is pressed.
Beta Was this translation helpful? Give feedback.
All reactions