From ee1c25bf258eb61beb66e65d7e7e53636908a28d Mon Sep 17 00:00:00 2001 From: Punyapal Shah Date: Thu, 15 May 2025 19:57:27 +0530 Subject: [PATCH] Fix total rows calculation for pagination in CanExportRecords trait --- packages/actions/src/Concerns/CanExportRecords.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/actions/src/Concerns/CanExportRecords.php b/packages/actions/src/Concerns/CanExportRecords.php index 49e3fda392..af0f0907dc 100644 --- a/packages/actions/src/Concerns/CanExportRecords.php +++ b/packages/actions/src/Concerns/CanExportRecords.php @@ -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) {