Merge pull request #160 from dderbentsov/UC-64
WIP Исправила баг пагинации при поиске
This commit is contained in:
@@ -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]
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user