Fix total rows calculation for pagination in CanExportRecords trait

This commit is contained in:
Punyapal Shah
2025-05-15 19:57:27 +05:30
parent fe644c2113
commit ee1c25bf25
@@ -130,7 +130,7 @@ trait CanExportRecords
$records = $action instanceof ExportTableBulkAction ? $action->getRecords() : null;
$totalRows = $records ? $records->count() : $query->count();
$totalRows = $records ? $records->count() : $query->toBase()->getCountForPagination();
$maxRows = $action->getMaxRows() ?? $totalRows;
if ($maxRows < $totalRows) {