Hello. I want allow users to sort posts list and filter by categories, text, date and few others. Currently I implemented ajax submitting of FilterForm model, but this only works for first page, because when I click on pagination, there is request to current url without any additional params, so ListView lost all filters. Probably I not explained it well, so look at images:
Changing page:
Maybe there is way to attach FilterForm model to ListView pagination or I should implement filtering and sorting in other way?
Just let Gii generate CRUD pages for you. You’ll find exactly what you want in the index page. Although it uses GridView by default, you can optionally use ListView instead. (Change “Widget Used in index Page” from GridView to ListView in the generator’s settings.)