-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
In pagination.js the page count is initial set 2 times in first in created() and again in mounted(). If this is solved an edge case issue, then then comment should be updated?
Note that I didn't find any bugs related to this.
bootstrap-vue/src/components/pagination/pagination.js
Lines 79 to 97 in 9722376
created() { | |
// Set the initial page count | |
this.localNumberOfPages = this.numberOfPages | |
// Set the initial page value | |
const currentPage = toInteger(this[MODEL_PROP_NAME], 0) | |
if (currentPage > 0) { | |
this.currentPage = currentPage | |
} else { | |
this.$nextTick(() => { | |
// If this value parses to `NaN` or a value less than `1` | |
// trigger an initial emit of `null` if no page specified | |
this.currentPage = 0 | |
}) | |
} | |
}, | |
mounted() { | |
// Set the initial page count | |
this.localNumberOfPages = this.numberOfPages | |
}, |