External pagination count not synced upon table search
See original GitHub issueSteps to reproduce
- Open this codepen
- Search for anything (e.g Frozen )
Versions
Latest Vue, Vuetify Browser: Latest Chrome on Windows 10
What is expected ?
The pagination number should change based on search results. When I search for “Frozen” which gives me 1 out of 10 items, the pagination count is 2 instead of 1, Suggestion: Maybe provide another example in the docs which will sync the searched item count instead of the passed items to the table
pages () {
return this.pagination.rowsPerPage ? Math.ceil(this.items.length / this.pagination.rowsPerPage) : 0
}
Instead of this.items.length
maybe there is a way to expose this.searchedItems.length
What is actually happening ?
The pagination count is based on the initial set of items which is changes when you search in the table.
Reproduction Link
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Vuetify v-data-table does not update pagination - Stack Overflow
So the total seems correct, but does not get updated in the v-data-table. It only shows a '-' sign. The pagination object seems...
Read more >Omit record count in a list - Product Documentation | ServiceNow
Select Remove pagination count. (Optional) To omit the record count only in specific view: Select Remove pagination count for specific views.
Read more >Pagination guidelines - GitLab Docs
Offset-based pagination is the easiest way to paginate over records, however, it does not scale well for large database tables.
Read more >Table pagination and sorting - OutSystems 11 Documentation
In the OnSort drop-down list box of your Table Widget properties, select New On Sort Client Action. A new Action is created with...
Read more >Need help vuetify data table pagination.sync makes repetative ...
Hi I am new to vue please help me I have around 1300 rows in my table and I want to fetch 10...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The total length is already exposed on pagination object in the
totalItems
property. However it was not correctly updating when searching.it seems like when i add the search property to the v-data-table… doing that directly, while setting totalItems seems to be the cause, is there a fix for this? I have other data tables where setting the totalItems does populate the pagination 0-25 of 150 results etc…