fix(grid): reload restored data tabs from shortcuts
This commit is contained in:
1 parent
9cf62a1c71
commit
16d7aef4db
3 files changed
+37
-4
No files matched your search
@@ -2,6 +2,7 @@
|
||||
import { computed, ref, defineAsyncComponent, watch, nextTick, onMounted, onUnmounted } from "vue";
|
||||
import { safeLocalStorageGet, safeLocalStorageSet } from "@/lib/backend/safeStorage";
|
||||
import { appendDebugLog, isDebugLoggingEnabled } from "@/lib/backend/debugLog";
|
||||
import { canReloadUnavailableDataTab } from "@/lib/table/tableDataRefresh";
|
||||
import type { CSSProperties } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { Check, Columns3, EyeOff, Loader2, Search, GitBranch, BarChart3, TableProperties, ChevronDown, ChevronUp, Inbox, RefreshCcw, Timer, Wrench, Toolbox, ListChecks, Database, Download, Upload, X, Pin, Rows3, SquareDashed, Minus, Plus } from "@lucide/vue";
|
||||
@@ -743,6 +744,11 @@ function stopQueryResultAutoRefresh() {
|
||||
function refreshData(): boolean {
|
||||
if (props.activeTab.mode === "etcd") return etcdKeyBrowserRef.value?.refresh?.() ?? false;
|
||||
if (props.activeTab.mode === "zookeeper") return zookeeperKeyBrowserRef.value?.refresh?.() ?? false;
|
||||
// Restored data tabs intentionally omit row data, so refresh must work before DataGrid mounts.
|
||||
if (canReloadUnavailableDataTab(props.activeTab)) {
|
||||
emit("reload");
|
||||
return true;
|
||||
}
|
||||
if (!dataGridRef.value) return false;
|
||||
void dataGridRef.value.onToolbarRefresh();
|
||||
return true;
|
||||
@@ -799,10 +805,7 @@ function handleModRTarget(target: Element): boolean {
|
||||
if (target.closest("[data-query-editor-root]")) return queryEditorRef.value?.openReplace() ?? false;
|
||||
if (target.closest("[data-cell-detail-editor-root]")) return dataGridRef.value?.openCellDetailSearch() ?? false;
|
||||
if (target.closest("[data-grid-root]")) return refreshData();
|
||||
if (props.activeTab.mode === "data" && !props.activeTab.result && !props.activeTab.isExecuting) {
|
||||
emit("reload");
|
||||
return true;
|
||||
}
|
||||
if (canReloadUnavailableDataTab(props.activeTab)) return refreshData();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user