You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say your admin has only 8 pages.
If you modify the page parameter in the query and look for the page 10 you'll get:
This situation can also happen with persisted filter, if the list is modified by someone else when I'm on it (I'm on the last page and someone remove the last lines) or I log out/log in with another user and refresh the list.
It's really hard to understand that I'm on page 10, and that I see nothing because there is only 10 pages. Plus, I can't go to a valid page easily. I need to reset the filter, which is not obvious for users.
There should be a better UX, for example the list of available pages should be still there (but if only one page exists that's not enough since we don't display the page choice). Another solution could be to display something like "The page xx reports no result ; Try with page 1".
The text was updated successfully, but these errors were encountered:
There is still something weird in the way the Pager works.
The Datagrid call buildPager.
In this method, there are the following call $this->pager->setPage($page); to set the page, then $this->pager->setQuery($this->query); to set the query and finally $this->pager->init();.
In the init method, we set the lastPage $this->setLastPage(max(1, $t));.
This method is doing
if ($this->getPage() > $page) {
$this->setPage($page);
}
So if i have only 3 pages, and I try to access the fourth one, the query is looking for the fourth one, but then I tell my Pager I'm page 3. IMHO we should let the Pager page 4, it would be then easier in the twig to give a better UX if page > lastPage.
Environment
Subject
Let's say your admin has only 8 pages.
If you modify the
page
parameter in the query and look for the page10
you'll get:This situation can also happen with persisted filter, if the list is modified by someone else when I'm on it (I'm on the last page and someone remove the last lines) or I log out/log in with another user and refresh the list.
It's really hard to understand that I'm on page 10, and that I see nothing because there is only 10 pages. Plus, I can't go to a valid page easily. I need to reset the filter, which is not obvious for users.
There should be a better UX, for example the list of available pages should be still there (but if only one page exists that's not enough since we don't display the page choice). Another solution could be to display something like "The page xx reports no result ; Try with page 1".
The text was updated successfully, but these errors were encountered: