fix(data): use saved row limit for table opens

This commit is contained in:
t8y2 committed 2026-07-03 14:00:39 +08:00
1 parent 21cec24e75
commit 1ff3676531
6 files changed
+19 -12

No files matched your search

+3 -3
View File
@@ -2,7 +2,7 @@ import { DEFAULT_RESULT_PAGE_SIZE, normalizeResultPageSize } from "@/lib/paginat
export const DEFAULT_TABLE_OPEN_PAGE_LIMIT = DEFAULT_RESULT_PAGE_SIZE;
export function tableOpenPageLimit(): number {
// Opening a table should not inherit the mutable SQL result-grid rows-per-page setting.
return normalizeResultPageSize(DEFAULT_TABLE_OPEN_PAGE_LIMIT);
export function tableOpenPageLimit(preferredLimit?: unknown): number {
// Data tabs should reopen with the rows-per-page preference the grid persists.
return normalizeResultPageSize(preferredLimit, DEFAULT_TABLE_OPEN_PAGE_LIMIT);
}