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

@@ -167,6 +167,7 @@ import { connectionIsEffectivelyReadOnly } from "@/lib/database/readOnlyWriteAcc
type DataGridHandle = DataGridColumnLayoutHandle & {
onToolbarRefresh: () => Promise<void> | void;
focusSearch: () => boolean;
openGoToColumn: () => boolean;
openCellDetailSearch: () => boolean;
nullColumnsHidden: boolean;
allNullColumnCount: number;
@@ -902,6 +903,11 @@ function focusSearch(): boolean {
return dataGridRef.value?.focusSearch() ?? false;
}
function openGoToColumn(): boolean {
if (props.activeTab.mode !== "data") return false;
return dataGridRef.value?.openGoToColumn() ?? false;
}
function refreshQueryEditorCompletionCache(): boolean {
if (props.activeTab.mode !== "query" || !queryEditorRef.value) return false;
queryEditorRef.value.refreshCompletionCache();
@@ -1163,6 +1169,7 @@ async function executeRedisCommand(command: string): Promise<boolean> {
defineExpose({
focusSearch,
openGoToColumn,
refreshData,
toggleResultsPane,
refreshQueryEditorCompletionCache,