Pagination divides data into pages using loader because it provides setting first and maximum results. Pagination cannot detect “from” and “to” positions if container does not use loader and therefore shows data in one page.
I think in your case, the correct way is to specify loader with delegation. In this delegation, you should consider the first and maximum results while loading data:
The issue is when filtering the customers by name for example, the pagination settings doesn’t update. I still have 10 pages displayed, despite the number of filtered customers is just 5.
You should consider your query condition also in total count query. After you apply a condition, totalCountDelegate still counts the whole customer table.
You can change the query or use LoadContext with query parameters from loader:
That works, however when clearing the filters the pagination is not updated. With filtering value, the number of pages is reduced. But clearing the filters doesn’t update the number of pages back.
Probably, the query still contains condition with filter parameter. Do you use Filter component or use some field to filter items? How do you define condition in the query?
Could you share screen XML descriptor and controller code?
Unfortunately, I cannot reproduce the issue with example from above link.
I guess the parameter still presents in the query, but cannot I cannot check it. Could you please share some small demo project where the problem is reproduced?
Also, you can set a break point to paginationTotalCountDelegate() and check DataContext/Query whether they contain a parameter with value.