fix(grid): preserve exact totals beyond the result row limit

Closes #6786
This commit is contained in:
t8y2 committed 2026-08-20 14:26:52 +00:00
1 parent b4015a4393
commit 69e5e81071
5 files changed
+61 -15

No files matched your search

@@ -42,9 +42,10 @@ export function dataGridTotalRowCountLabelKey(totalRowCountIsExact: boolean, ine
return inexactMode === "estimated" ? "grid.totalRowCountEstimated" : "grid.totalRowCountAtLeast";
}
export function resolveDataGridPaginationTotal(options: { paginationTotalRowCount?: number; serverKnownTotalRowCount?: number; totalRowCountIsExact: boolean }): number | undefined {
if (options.paginationTotalRowCount !== undefined) return options.paginationTotalRowCount;
return options.totalRowCountIsExact ? options.serverKnownTotalRowCount : undefined;
export function resolveDataGridPaginationTotal(options: { paginationTotalRowCount?: number; serverKnownTotalRowCount?: number; totalRowCountIsExact: boolean; maxRows?: number }): number | undefined {
const total = options.paginationTotalRowCount ?? (options.totalRowCountIsExact ? options.serverKnownTotalRowCount : undefined);
if (total === undefined || options.maxRows === undefined) return total;
return Math.min(total, options.maxRows);
}
export function hasCompleteLocalDataGridResult(options: CompleteLocalDataGridResultOptions): boolean {