From d67838f60f58109bc6eaa875b6fd25b23167e412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 15 Dec 2020 09:29:47 +0100 Subject: [PATCH] fix(b-pagination): don't set initial page count twice --- src/components/pagination/pagination.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/pagination/pagination.js b/src/components/pagination/pagination.js index eefbe1dee1c..b9ccf2d5a0e 100644 --- a/src/components/pagination/pagination.js +++ b/src/components/pagination/pagination.js @@ -49,8 +49,8 @@ export const BPagination = /*#__PURE__*/ Vue.extend({ const result = mathCeil(sanitizeTotalRows(this.totalRows) / sanitizePerPage(this.perPage)) return result < 1 ? 1 : result }, + // Used for watching changes to `perPage` and `numberOfPages` pageSizeNumberOfPages() { - // Used for watching changes to `perPage` and `numberOfPages` return { perPage: sanitizePerPage(this.perPage), totalRows: sanitizeTotalRows(this.totalRows), @@ -91,10 +91,6 @@ export const BPagination = /*#__PURE__*/ Vue.extend({ }) } }, - mounted() { - // Set the initial page count - this.localNumberOfPages = this.numberOfPages - }, methods: { // These methods are used by the render function onClick(event, pageNumber) {