fix(grid): persist table info tab preference

This commit is contained in:
zipg authored and GitHub committed 2026-07-23 19:03:14 +08:00
1 parent 9f42f478bf
commit c6135d6bb2
7 files changed
+139 -9

No files matched your search

@@ -0,0 +1,5 @@
type TableInfoTextSelection = Pick<Selection, "isCollapsed" | "toString">;
export function shouldNavigateFromTableInfoColumnClick(selection?: TableInfoTextSelection | null): boolean {
return !selection || selection.isCollapsed || selection.toString().length === 0;
}
@@ -0,0 +1,6 @@
import type { TableInfoTab } from "@/types/database";
export function tableInfoTabForDrawerToggle(drawerOpen: boolean, activeTab: TableInfoTab, preferredTab: TableInfoTab, requestedTab?: TableInfoTab): TableInfoTab {
if (requestedTab) return requestedTab;
return drawerOpen ? activeTab : preferredTab;
}