From 27a26440b3104059ef890c95af850b9a43926a31 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Sun, 19 Jan 2025 00:42:43 +0000 Subject: Coppied livewire pagination to my own --- src/TableComponent.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/TableComponent.php b/src/TableComponent.php index da31a90..b8fae6a 100644 --- a/src/TableComponent.php +++ b/src/TableComponent.php @@ -6,6 +6,7 @@ use Livewire\Component; use Livewire\WithPagination; use Livewire\Attributes\Url; +use Illuminate\Pagination\Paginator; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Str; @@ -94,6 +95,8 @@ abstract class TableComponent extends Component $allColumns = $this->getColumns(); $columns = $allColumns->filter(fn($c) => in_array($c->name,$this->activeColumns)); + Paginator::defaultView('laralight-tables::pagination'); + return view('laralight-tables::table', [ 'searchable' => $this->searchable, 'searchDebounce' => $this->searchDebounce, -- cgit v1.2.3