feat(grid): add pinned query result history
This commit is contained in:
1 parent
fe39a38dd4
commit
c155443d4b
7 files changed
+167
-30
No files matched your search
@@ -41,6 +41,7 @@ export interface SavedOpenTab {
|
||||
resultCacheKey?: string;
|
||||
resultRuns?: SavedQueryResultRun[];
|
||||
activeResultRunId?: string;
|
||||
resultAutoSave?: boolean;
|
||||
}
|
||||
|
||||
export interface RestoredOpenTabs {
|
||||
@@ -92,6 +93,7 @@ export function serializeOpenTabs(tabs: QueryTab[]): SavedOpenTab[] {
|
||||
}
|
||||
: {}),
|
||||
...(tab.mode === "query" && tab.activeResultRunId !== undefined ? { activeResultRunId: tab.activeResultRunId } : {}),
|
||||
...(tab.mode === "query" && tab.resultAutoSave ? { resultAutoSave: true } : {}),
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -135,6 +137,7 @@ export function restoreOpenTabsState(rawTabs: string | null, rawActiveTabId: str
|
||||
resultCacheState: mode !== "data" && tab.resultCacheKey ? "disk" : undefined,
|
||||
resultRuns,
|
||||
activeResultRunId: resultRuns?.some((run) => run.id === tab.activeResultRunId) ? tab.activeResultRunId : resultRuns?.[0]?.id,
|
||||
resultAutoSave: mode === "query" && tab.resultAutoSave ? true : undefined,
|
||||
};
|
||||
});
|
||||
const activeTabId = rawActiveTabId || null;
|
||||
|
||||
Reference in new issue
Block a user