From b3276e257280bed2f880db7d562a7c73a92d82c9 Mon Sep 17 00:00:00 2001 From: magemi Date: Thu, 7 Jan 2021 14:59:01 -0500 Subject: [PATCH] Update {first} placeholder in currentPageReportTemplate of paginator to use 0 instead of 1 when no rows are in the table --- src/app/components/paginator/paginator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/paginator/paginator.ts b/src/app/components/paginator/paginator.ts index 33f4b4b5ac7..be12c1877c6 100755 --- a/src/app/components/paginator/paginator.ts +++ b/src/app/components/paginator/paginator.ts @@ -284,7 +284,7 @@ export class Paginator implements OnInit, OnChanges { return this.currentPageReportTemplate .replace("{currentPage}", String(this.getPage() + 1)) .replace("{totalPages}", String(this.getPageCount())) - .replace("{first}", String(this._first + 1)) + .replace("{first}", String(Math.min(this._first + 1, this.totalRecords))) .replace("{last}", String(Math.min(this._first + this.rows, this.totalRecords))) .replace("{rows}", String(this.rows)) .replace("{totalRecords}", String(this.totalRecords));