-
Notifications
You must be signed in to change notification settings - Fork 11
feat(value-list, pick-list): support ↑↓ arrow keys for navigation and value selection when multiple mode is disabled #887
Conversation
@jcfranco this is working but needs the following still:
|
@driskull Can you review? 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! 👍
@jcfranco the only concern I have is that maybe the control slot should receive focus for pick list?
For example, I can't keyboard to the "X" icon without selecting that item first.
Could you walk me through that? When you tab into a list with removable items, you'd want the X to be focused and then ↑ ↓ would move between other item's Xs? |
Yeah, I'm not sure what would be ideal. Maybe we could proceed with how you have it and then we can consult with Arjav? |
Sounds good. 👌 |
Approving on behalf of @driskull. 🤜:boom: 🤛 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mother-tested, self-approved!
Related Issue: #873
Summary
This updates the
pick/value-list
components to support item navigation with the up/down arrow keys. Whenmultiple
is disabled, moving an item will also affect item selection (akin to radio groups).Notable changes
setFocus
to lists and items."calciteListItemChange"
event used by thevalue-list
is modified before it continues bubbling to adjust the item instance accordingly since it was always apick-list-item
instance.