Interactivity
The Table
component will respond to various keyboard inputs from users to allow for more fine-grained interaction. The following list outlines the various behaviors when the designated key is pressed:
Keyboard Interations
Key | Behavior |
---|---|
Space | Selects the current row. |
Enter | Focuses the cell, or the focusable element if the cell has a renderer. |
Home | Focuses the first cell of the first column and row. |
End | Focuses the last cell of the last column and row. |
Shift + Tab | If the cell is in the body of the table and Shift + Tab is pressed, it focuses the first focusable cell in the header. |
→ | If the Ctrl key is pressed, it focuses the last cell of the current row. Otherwise, it focuses the next cell horizontally. |
← | If the Ctrl key is pressed, it focuses the first cell of the current row. Otherwise, it focuses the previous cell horizontally. |
↑ | If the Ctrl key is pressed, it focuses the first cell of the current column. Otherwise, it focuses the previous cell vertically. |
↓ | If the Ctrl key is pressed, it focuses the last cell of the current column. Otherwise, it focuses the next cell vertically. |