Added ctrl-p/n keybindings for filters (#1006) (#1036)

Co-authored-by: Ruibin Xing <xingruibin@kanyun.com>
pull/1039/head
Ruibin Xing 2024-08-15 22:41:15 +08:00 committed by GitHub
parent b69f6916fc
commit 770b4b3b59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -182,6 +182,16 @@ export function FilterList({
break;
}
}
if (e.ctrlKey && e.key === "n") {
setSelectionOption(
Math.min(matchingOptions.length - 1, selectedOption + 1),
);
return true;
}
if (e.ctrlKey && e.key === "p") {
setSelectionOption(Math.max(0, selectedOption - 1));
return true;
}
return false;
}}
/>