From 2b00a72b7aaa42aef504a257c4404a869e96f34c Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Fri, 27 Aug 2021 17:26:57 +0300 Subject: [PATCH] Fixed #1475 - CurrentPageReport displays wrong value --- src/components/paginator/CurrentPageReport.vue | 4 ++-- src/components/paginator/JumpToPageDropdown.vue | 5 +++-- src/components/paginator/Paginator.vue | 17 ++++++++++------- .../paginator/RowsPerPageDropdown.vue | 5 +++-- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/paginator/CurrentPageReport.vue b/src/components/paginator/CurrentPageReport.vue index e8178b2dd..4156a68ac 100755 --- a/src/components/paginator/CurrentPageReport.vue +++ b/src/components/paginator/CurrentPageReport.vue @@ -34,9 +34,9 @@ computed: { text() { let text = this.template - .replace("{currentPage}", this.page + 1) + .replace("{currentPage}", this.pageCount > 0 ? this.page + 1 : 0) .replace("{totalPages}", this.pageCount) - .replace("{first}", this.first + 1) + .replace("{first}", this.pageCount > 0 ? this.first + 1 : 0) .replace("{last}", Math.min(this.first + this.rows, this.totalRecords)) .replace("{rows}", this.rows) .replace("{totalRecords}", this.totalRecords); diff --git a/src/components/paginator/JumpToPageDropdown.vue b/src/components/paginator/JumpToPageDropdown.vue index 37e7dc736..a3d819086 100644 --- a/src/components/paginator/JumpToPageDropdown.vue +++ b/src/components/paginator/JumpToPageDropdown.vue @@ -1,6 +1,6 @@