mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 00:01:22 +02:00
Narrow vim keys selector
This commit is contained in:
@@ -303,7 +303,7 @@ function TreeInner<T extends { id: string }>(
|
|||||||
|
|
||||||
// If the selected item is a collapsed folder, expand it. Otherwise, select next item
|
// If the selected item is a collapsed folder, expand it. Otherwise, select next item
|
||||||
useKey(
|
useKey(
|
||||||
(e) => e.key === 'ArrowRight' || e.key.toLowerCase() === 'l',
|
(e) => e.key === 'ArrowRight' || e.key === 'l',
|
||||||
(e) => {
|
(e) => {
|
||||||
if (!isSidebarFocused()) return;
|
if (!isSidebarFocused()) return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -329,7 +329,7 @@ function TreeInner<T extends { id: string }>(
|
|||||||
// If the selected item is in a folder, select its parent.
|
// If the selected item is in a folder, select its parent.
|
||||||
// If the selected item is an expanded folder, collapse it.
|
// If the selected item is an expanded folder, collapse it.
|
||||||
useKey(
|
useKey(
|
||||||
(e) => e.key === 'ArrowLeft' || e.key.toLowerCase() === 'h',
|
(e) => e.key === 'ArrowLeft' || e.key === 'h',
|
||||||
(e) => {
|
(e) => {
|
||||||
if (!isSidebarFocused()) return;
|
if (!isSidebarFocused()) return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user