diff --git a/packages/actions/src/Concerns/CanExportRecords.php b/packages/actions/src/Concerns/CanExportRecords.php index 225387a7c5..52614225bb 100644 --- a/packages/actions/src/Concerns/CanExportRecords.php +++ b/packages/actions/src/Concerns/CanExportRecords.php @@ -153,6 +153,11 @@ trait CanExportRecords $records = $action instanceof ExportBulkAction ? $action->getIndividuallyAuthorizedSelectedRecords() : null; $totalRows = $records ? $records->count() : $query->toBase()->getCountForPagination(); + + if ((! $records) && $query->getLimit()) { + $totalRows = min($totalRows, $query->getLimit()); + } + $maxRows = $action->getMaxRows() ?? $totalRows; if ($maxRows < $totalRows) {