feat(grid): add go-to-column shortcut and keyboard navigation

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-30 03:05:32 +08:00
1 parent 50e9d8bbb1
commit 22775f3639
4 files changed
+156 -17

No files matched your search

+11 -1
View File
@@ -74,6 +74,7 @@ import {
isExecuteSqlInNewResultTabShortcut,
isExecuteSqlShortcut,
isFocusSearchShortcut,
isGoToColumnShortcut,
isModRShortcut,
handleTabHistoryNavigationShortcut,
isNewQueryShortcut,
@@ -2570,8 +2571,17 @@ async function handleKeydown(e: KeyboardEvent) {
if (e.defaultPrevented) return;
const shortcuts = settingsStore.editorSettings.shortcuts;
const tabSwitcherDirection = tabSwitcherDirectionFromShortcut(e, shortcuts);
if (showTabSwitcher.value) return;
// Grid-scoped shortcuts normally win inside DataGrid. Keep that precedence
// for a data tab even when focus is in a sibling input, where the grid's
// local listener intentionally leaves native editing untouched.
if (isGoToColumnShortcut(e, shortcuts) && contentAreaRef.value?.openGoToColumn()) {
e.preventDefault();
e.stopPropagation();
return;
}
const tabSwitcherDirection = tabSwitcherDirectionFromShortcut(e, shortcuts);
if (tabSwitcherDirection) {
e.preventDefault();
e.stopPropagation();