Repository navigation
fix(ui5-table): add keyboard drag and drop support - #14201
TeodorTaushanov wants to merge 1 commit into
Conversation
Table rows could only be reordered with the mouse, while List already supports reordering movable items with the keyboard. This adds the same keyboard support to the Table. Pressing Ctrl + Arrow moves a movable row one position; Ctrl + Home/End moves it to the top/bottom. The handler reuses the shared findClosestPositionsByKey utility and fires the existing move-over/move events, mirroring List and TabContainer.
|
🚀 Deployed on https://pr-14201--ui5-webcomponents-preview.netlify.app |
Aren't these statements an explicit admission that we lack a proper reuse layer? Ideally, reordering (and many of the already existing d&d implementation) should be implemented in a shared layer so that List, Table, and other applicable controls can reuse the same behavior, including keyboard interactions, drag-and-drop, and move events. Otherwise, every new feature or bug fix must be implemented and maintained separately for each control, leading to duplication and behavioral inconsistencies over time. |
|
While looking at the core d&d implementation, I noticed that component d&d logic is needed seemingly because of the |
|
@aborjinik I have opened #14238 to tackle this. |
Table rows could only be reordered with the mouse, while List already supports reordering movable items with the keyboard. This adds the same keyboard support to the Table.
Pressing Ctrl + Arrow moves a movable row one position; Ctrl + Home/End moves it to the top/bottom. The handler reuses the shared findClosestPositionsByKey utility and fires the existing move-over/move events, mirroring List and TabContainer.
fixes #14135