Merge pull request #160 from dderbentsov/UC-64

WIP Исправила баг пагинации при поиске
This commit is contained in:
Daria Golova
2022-11-28 14:04:16 +03:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

View File

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

View File

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