MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

How do I customize the dropdown of records per page? #60

Closed jprograming closed 3 years ago

miten5 commented 4 years ago

add per-page="20" to your livewire component

eg:

<livewire:datatable
    model="App\User"
   per-page="20"
/>
jprograming commented 3 years ago

I mean the list of items from the drop down menu.

MillerAdulu commented 3 years ago

To be able to customize this, publish the views from the package by using: $ php artisan vendor:publish the choose the Provider: Mediconesystems\LivewireDatatables\LivewireDatatablesServiceProvider option

After, open views.livewire.datatables.datatable and on lines 150-158 you have the drop down menu that you can be able to customize to your liking.