mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
fix duplicate chunked query results
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user