Skip to content

Commit 88b95c6

Browse files
authored
fix(b-pagination-nav): attempt to auto-detect current page when pages array or number of pages changes (closes #3443) (#3444)
Closes #3443
1 parent 4287ddf commit 88b95c6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/pagination-nav/pagination-nav.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ export default Vue.extend({
107107
},
108108
created() {
109109
this.setNumPages()
110-
// For SSR, assuming a page URL can be detected
111-
this.$nextTick(() => {
112-
this.guessCurrentPage()
113-
})
114110
},
115111
mounted() {
116112
if (this.$router) {
@@ -131,6 +127,9 @@ export default Vue.extend({
131127
} else {
132128
this.localNumPages = sanitizeNumPages(this.numberOfPages)
133129
}
130+
this.$nextTick(() => {
131+
this.guessCurrentPage()
132+
})
134133
},
135134
onClick(pageNum, evt) {
136135
// Dont do anything if clicking the current active page

0 commit comments

Comments
 (0)