New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] VDataTable automatically return to first page #10949
Comments
A user of Yomi.ai noticed and documented the same behavior here. Using Vuetify 2.2.27. |
I think it's generally ideal for any kind of filtering action (including removal of filters) to reset pagination. |
I facing this problem and never find the solution to fix. |
Here's my take on it - codepen based on example from Server-side paginate and sort. I've changed the items per page to 5 so there is pagination. I've added a search property that is watched (in addition to options). In the handler I reset the page count. If I you don't do this and search for "f" on page 2 - Frozen Yogurt will not show up. |
I can confirm this issue. If I go forward two pages, perform search, get the response and update the table data I get something like this in the footer: I do update the It's server side pagination, obviously. |
I just encountered the same problem.... any solutions yet? |
@stianl's code is an excellent example (and probably should have a reference in the docs). I think the key here is to set whatever variable you are using as the page sync, whether its via individual props or options before making the call to your API. |
I have a similar issue. See demo. Go to page 2. The button sets page to 1, but it doesn't react. |
Setting |
Problem to solve
If you have a table with dynamic content (e.g. 200 rows) and have pagination set to 50 and go to page 3. Then do something externally to change the number of rows down to 20, the table will stay at the position of "150-20 of 20"
Proposed solution
If the table detects that the current position is beyond the total number of pages, it returns to page 1.
The text was updated successfully, but these errors were encountered: