rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.74k stars 329 forks source link

Searching should reset pagination? #207

Closed nguillaumin closed 3 years ago

nguillaumin commented 3 years ago

Currently the pagination is not reset when a search is made, meaning that if there are less results than the current page you are seeing, the "no results" message is shown. Manually resetting the pagination (by removing the page URL parameter for example) fixes it.

Is that expected? Should searching always reset the current page? I suspect that would be the behavior expected by most users.

rappasoft commented 3 years ago

Yes you're right I forgot to port that over from the last version. Will add.

rappasoft commented 3 years ago

Fixed: https://github.com/rappasoft/laravel-livewire-tables/blob/master/src/Traits/WithFilters.php#L23