mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
feat: improve list keyboard navigation
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
"react-scrollbars-custom": "^4.0.25",
|
||||
"react-toggle": "^4.1.2",
|
||||
"react-virtualized-auto-sizer": "^1.0.4",
|
||||
"react-virtuoso": "^1.9.3",
|
||||
"react-virtuoso": "^2.4.0",
|
||||
"rebass": "^4.0.7",
|
||||
"showdown": "github:thecodrr/showdown",
|
||||
"streamablefs": "file:packages/streamablefs",
|
||||
|
||||
@@ -78,7 +78,11 @@ function ListContainer(props) {
|
||||
}
|
||||
|
||||
if (isUp || isDown) {
|
||||
listRef.current.scrollToIndex(nextIndex);
|
||||
listRef.current.scrollIntoView({
|
||||
index: nextIndex,
|
||||
behavior: "auto",
|
||||
});
|
||||
e.preventDefault();
|
||||
const listItem = listContainerRef.current.querySelector(
|
||||
`[data-item-index="${nextIndex}"]`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user