feat: add search menu to all resources
This commit is contained in:
@@ -102,7 +102,15 @@ export const KMenu = (
|
||||
}
|
||||
|
||||
useEventListener("keydown", (ev: KeyboardEvent) => {
|
||||
if (ev.key === "/" && ev.ctrlKey) {
|
||||
if (ev.key === "k") {
|
||||
if (ev?.target?.nodeName == "INPUT") {
|
||||
return;
|
||||
}
|
||||
if (!visible.value) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
}
|
||||
|
||||
visible.value = !visible.value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user