Skip to content

Commit 4e704ac

Browse files
committed
Add typed property to selected and cast selectPageRows to array
1 parent b3d24ef commit 4e704ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/WithBulkActions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait WithBulkActions
1414
public string $primaryKey = 'id';
1515
public bool $selectPage = false;
1616
public bool $selectAll = false;
17-
public $selected = [];
17+
public array $selected = [];
1818
public array $bulkActions = [];
1919
public bool $hideBulkActionsOnEmpty = false;
2020

@@ -49,7 +49,7 @@ public function updatedSelectPage($value): void
4949

5050
public function selectPageRows(): void
5151
{
52-
$this->selected = $this->rows->pluck($this->primaryKey)->map(fn ($key) => (string) $key);
52+
$this->selected = $this->rows->pluck($this->primaryKey)->map(fn ($key) => (string) $key)->toArray();
5353
}
5454

5555
public function selectAll(): void

0 commit comments

Comments
 (0)