Skip to content

List — Expose left/right arrow key events and active element #6087

@taysea

Description

@taysea

Expected Behavior

Caller should be able to hook into left/right arrow key events and be have access to which list item was active when the arrow key was pressed. This would be beneficial to allow for behaviors such as left/right arrow keys to traverse through a nested list (such as traversing a multi-level file browser or a tree).

Actual Behavior

Unable to know which item is active when right/left arrow is pressed. Also, there is no way to listen for the left/right arrow key without wrapping the List in a Keyboard component.

URL, screen shot, or Codepen exhibiting the issue

Steps to Reproduce

Your Environment

  • Grommet version: stable
  • Browser Name and version: chrome macoS
  • Operating System and version (desktop or mobile): macOS Monterey

Metadata

Metadata

Labels

enhancementA suggestion to add to or change behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions