Skip to content

Commit 2f7623d

Browse files
authored
Merge pull request #92 from kouts/dev
fix: fixed set active page to last page
2 parents 66db299 + 371cf6a commit 2f7623d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Dataset.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,10 @@ export default {
178178
this.dsSearch = value
179179
},
180180
showEntries(value) {
181-
const pagesBeforeChange = this.dsPages
182-
183181
this.dsShowEntries = value
184182
this.$nextTick(() => {
185-
const pagesAfterChange = this.dsPages
186-
187-
if (pagesAfterChange.length < pagesBeforeChange.length) {
188-
this.setActive(pagesAfterChange[pagesAfterChange.length - 1])
183+
if (this.dsPage > this.dsPagecount) {
184+
this.setActive(this.dsPages[this.dsPages.length - 1])
189185
}
190186
})
191187
},

0 commit comments

Comments
 (0)