-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
🙋 Feature Request
In @react-aria/selection
ctrl
+a
or cmd
+a
selects all items in a selectable collection. It would be useful if the same key combination would deselect all items if all items are already selected. This is the pattern recommended in the listbox aria patterns:
Control + A (Optional): Selects all options in the list. Optionally, if all options are selected, it may also unselect all options.
🤔 Expected Behavior
ctrl
+a
and cmd
+a
do not deselect all items if all items are already selected.
😯 Current Behavior
ctrl
+a
and cmd
+a
deselect all options if all options are already selected.
💁 Possible Solution
Seems like a simple change in this file if I am not wrong.
🔦 Context
I built a custom select
which allows for multiple selection in the listbox in the dropdown. There, esc
is already mapped to closing the dropdown so there is no easy way to deselect all items. This is inconvenient both for keyboard or mouse users.
💻 Examples
N/A
🧢 Your Company/Team
N/A
🎁 Tracking Ticket (optional)
N/A