fix(grid): persist table info tab preference
This commit is contained in:
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;
|
||||
}
|
||||
Reference in new issue
Block a user