Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions packages/@react-stately/layout/src/ListLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,6 @@ export class ListLayout<T> extends Layout<Node<T>> implements KeyboardDelegate,
}
}

getKeyLeftOf(key: Key): Key {
return key;
}

getKeyRightOf(key: Key): Key {
return key;
}

Comment on lines -380 to -387
Copy link
Copy Markdown
Member Author

@LFDanLu LFDanLu Aug 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary now that useGridListItem handles left/right arrow keys presses in ListView rather than using useGridCell. Normal lists that use ListLayout won't have elements within their rows so they won't even use useGridCell

Would've written a test but didn't get accurate selectionStart returned by onKeyUp when triggering arrowleft/right (note: userEvent typing properly updated that). A updated version of user test library should fix this theoretically but that will require a greater refactor of our tests so I'll handle that later

getKeyPageAbove(key: Key) {
let layoutInfo = this.getLayoutInfo(key);

Expand Down