WIP Исправила баг пагинации при поиске

This commit is contained in:
Daria Golova
2022-11-28 14:00:59 +03:00
parent 87329785c7
commit 4178d01d1f
2 changed files with 4 additions and 5 deletions

View File

@@ -6,8 +6,8 @@
) )
.icon-down-arrow.arrow-left .icon-down-arrow.arrow-left
button.item.flex.items-center.justify-center( button.item.flex.items-center.justify-center(
v-for="page in pageCount", v-for="page, index in pageCount",
:key="page", :key="index",
:id="page", :id="page",
:class="currentPageStyle(page)", :class="currentPageStyle(page)",
:disabled="disabledMissingPages(page)" :disabled="disabledMissingPages(page)"
@@ -33,12 +33,12 @@ export default {
}, },
computed: { computed: {
pageCount() { pageCount() {
let countArray = [], let countArray = [];
incompleteCountArray = [];
for (let i = 1; i <= this.length; i++) { for (let i = 1; i <= this.length; i++) {
countArray.push(i); countArray.push(i);
} }
if (this.length <= this.totalVisible) return countArray; if (this.length <= this.totalVisible) return countArray;
let incompleteCountArray = [];
if ( if (
this.currentPage <= 2 || this.currentPage <= 2 ||
this.currentPage >= countArray[this.length - 2] this.currentPage >= countArray[this.length - 2]

View File

@@ -79,7 +79,6 @@ export default {
else this.textSearch = ""; else this.textSearch = "";
if (this.currentTablePage !== 1) this.currentTablePage = 1; if (this.currentTablePage !== 1) this.currentTablePage = 1;
else { else {
this.currentTablePage = 1;
this.fetchDataClients(); this.fetchDataClients();
} }
}, },