From ba8e8779dc07a6b16b8104bafa8d3cada42b4684 Mon Sep 17 00:00:00 2001 From: Akshay Anand Date: Wed, 17 Feb 2021 15:42:37 -0500 Subject: [PATCH] paging optimization --- src/components/Table.vue | 2 -- src/components/VgtPagination.vue | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/Table.vue b/src/components/Table.vue index 9c71615b..68224e4a 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -34,7 +34,6 @@ :ofText="ofText" :pageText="pageText" :allText="allText" - :paginated="paginated" > diff --git a/src/components/VgtPagination.vue b/src/components/VgtPagination.vue index c3bc239a..a0cbb6e6 100644 --- a/src/components/VgtPagination.vue +++ b/src/components/VgtPagination.vue @@ -82,7 +82,6 @@ export default { ofText: { default: 'of' }, pageText: { default: 'page' }, allText: { default: 'All' }, - paginated: {}, }, data() { @@ -128,8 +127,7 @@ export default { // Current displayed items paginatedInfo() { let first = ((this.currentPage - 1) * this.currentPerPage) + 1; - let last = Math.min(this.total, this.currentPage * this.currentPerPage); - // last = last - this.paginated.length; + const last = Math.min(this.total, this.currentPage * this.currentPerPage); if (last === 0) { first = 0;