feat(grid): add configurable shortcut to focus WHERE condition

This commit is contained in:
关关 authored and GitHub committed 2026-09-30 01:20:31 +08:00
1 parent 530bb2bb52
commit 7bc85dfcb0
27 files changed
+325

No files matched your search

@@ -273,6 +273,10 @@ export function isDeleteCurrentRowShortcut(event: ShortcutLikeEvent, shortcuts?:
return matchesShortcut(event, actionShortcut("deleteCurrentRow", shortcuts));
}
export function isFocusWhereShortcut(event: ShortcutLikeEvent, shortcuts?: Partial<ShortcutSettings>, platform = globalThis.navigator?.platform || ""): boolean {
return matchesShortcut(event, actionShortcut("focusWhere", shortcuts, platform), platform);
}
export function isGoToColumnShortcut(event: ShortcutLikeEvent, shortcuts?: Partial<ShortcutSettings>, platform = globalThis.navigator?.platform || ""): boolean {
return matchesShortcut(event, actionShortcut("goToColumn", shortcuts, platform), platform);
}
@@ -35,6 +35,7 @@ export type ShortcutActionId =
| "editTableStructure"
| "copyCurrentRow"
| "deleteCurrentRow"
| "focusWhere"
| "goToColumn"
| "goToFirstPage"
| "goToPreviousPage"
@@ -355,6 +356,12 @@ export const SHORTCUT_DEFINITIONS: ShortcutDefinition[] = [
scope: "grid",
defaultShortcut: "Delete",
},
{
id: "focusWhere",
labelKey: "settings.shortcutFocusWhere",
scope: "grid",
defaultShortcut: "",
},
{
id: "goToColumn",
labelKey: "settings.shortcutGoToColumn",