fix: preserve data grid order by input

This commit is contained in:
t8y2 committed 2026-06-02 11:36:59 +08:00
1 parent 1331d36a11
commit f5eb3ba5db
6 files changed
+29 -4

No files matched your search

@@ -15,6 +15,7 @@ export interface SavedOpenTab {
resultSortColumn?: string;
resultSortColumnIndex?: number;
resultSortDirection?: QueryTab["resultSortDirection"];
orderByInput?: string;
resultPageLimit?: number;
resultPageOffset?: number;
whereInput?: string;
@@ -47,6 +48,7 @@ export function serializeOpenTabs(tabs: QueryTab[]): SavedOpenTab[] {
...(tab.resultSortColumn !== undefined ? { resultSortColumn: tab.resultSortColumn } : {}),
...(tab.resultSortColumnIndex !== undefined ? { resultSortColumnIndex: tab.resultSortColumnIndex } : {}),
...(tab.resultSortDirection !== undefined ? { resultSortDirection: tab.resultSortDirection } : {}),
...(tab.orderByInput !== undefined ? { orderByInput: tab.orderByInput } : {}),
...(tab.resultPageLimit !== undefined ? { resultPageLimit: tab.resultPageLimit } : {}),
...(tab.resultPageOffset !== undefined ? { resultPageOffset: tab.resultPageOffset } : {}),
...(tab.whereInput !== undefined ? { whereInput: tab.whereInput } : {}),