fix duplicate chunked query results

This commit is contained in:
Dan Harrin
2025-06-15 10:28:32 +01:00
parent 9f2133d843
commit 6aeb3e1c0c
@@ -52,7 +52,9 @@ trait InteractsWithSelectedRecords
$records = $this->getLivewire()->getSelectedTableRecords($this->shouldFetchSelectedRecords(), $this->getSelectedRecordsChunkSize());
$this->totalSelectedRecordsCount = $records->count();
$this->totalSelectedRecordsCount = ($records instanceof LazyCollection)
? $this->getLivewire()->getSelectedTableRecordsQuery(shouldFetchSelectedRecords: false)->count()
: $records->count();
$this->successfulSelectedRecordsCount = $this->totalSelectedRecordsCount;
return $records;