Replies: 1 comment 4 replies
-
There was some discussion on this in #4476 as well. I'm not sure that we decided this is a good idea since there wouldn't be another way to clear the ListBox selection via keyboard. I think this is probably still up for debate. |
Beta Was this translation helpful? Give feedback.
4 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.
-
Hello,
Is there a way to disable clearing listbox selection when pressing the Escape key?
As far as I can tell, the only way to do that right now would be to drop down to
useListBox
(#2268). Which is unfortunate because that would mean losing all the benefits of<ListBox />
.Here's what we're trying to do: build a GitHub-like PR reviewer dialog. The dialog is composed of the folllowing:
Button
: this is the dialog triggerPopover
Dialog
SearchField
: allows filtering the items via our APIListBox
: for selectionThe UX is almost there: users can toggle the popover dialog via the button, filter items, etc… They can then tab over to the listbox and make their selection.
Then they can press ESC to close the popover. But that ends up clearing the list box as well.
I wonder if I'm overlooking something.
Beta Was this translation helpful? Give feedback.
All reactions