Open connecteev opened 1 year ago
If I understand this correctly then it's a Laravel Paginate function you need here. You need to add withQueryString() to the end of the query. eg:
$users = User::paginate(15)->withQueryString();
This should preserve all your filter parameters. [https://laravel.com/docs/master/pagination#customizing-pagination-urls](Laravel Docs)
Per the thread here: https://laracasts.com/series/infinite-scrolling-in-inertia/episodes/4?reply=23697 If you have filters data in URL, when you loadMoreItems, those filters reset and you receive unfiltered items.
From @lukeraymonddowning 's response, we’ll want to set the URL in the before hook rather than on initial page load so that your URL filters are kept in place.