Skip to content

Commit 2e0b415

Browse files
authored
Alow to use custom perpage in first load
1 parent e2a62ec commit 2e0b415

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/WithPerPagePagination.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function mountWithPerPagePagination(): void
2323
if (in_array(session()->get($this->tableName.'-perPage', $this->perPage), $this->perPageAccepted, true)) {
2424
$this->perPage = session()->get($this->tableName.'-perPage', $this->perPage);
2525
} else {
26-
$this->perPage = 10;
26+
$this->perPage = $this->perPageAccepted[0] ?? 10;
2727
}
2828
}
2929

0 commit comments

Comments
 (0)