From ea5a27fa13448a9a88e2b070fdf3bc0c91dc0c06 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Wed, 4 Mar 2020 12:29:46 +0300 Subject: [PATCH] Fixed #222 - CurrentPageReport is initially wrong --- .../paginator/CurrentPageReport.vue | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/components/paginator/CurrentPageReport.vue b/src/components/paginator/CurrentPageReport.vue index 4be4ded7c..90b61bafd 100644 --- a/src/components/paginator/CurrentPageReport.vue +++ b/src/components/paginator/CurrentPageReport.vue @@ -12,22 +12,10 @@ default: '({currentPage} of {totalPages})' } }, - data() { - return { - text: '' - } - }, - watch: { - page() { - this.text = this.template - .replace("{currentPage}", this.page + 1) - .replace("{totalPages}", this.pageCount); - } - }, - mounted() { - this.text = this.template - .replace("{currentPage}", this.page + 1) - .replace("{totalPages}", this.pageCount); + computed: { + text() { + return this.template.replace("{currentPage}", this.page + 1).replace("{totalPages}", this.pageCount); + } } } \ No newline at end of file