Skip to content

BPagination - initial page count set twice.  #6199

@Nesuarg

Description

@Nesuarg

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.

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
},

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions