Skip to content

Commit

Permalink
Fixed #9002 - {first} in currentPageReportTemplate always resolves to…
Browse files Browse the repository at this point in the history
… "1" even when no rows match
yigitfindikli committed Mar 5, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 73af5eb commit b69e360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/paginator/paginator.ts
Original file line number Diff line number Diff line change
@@ -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((this.totalRecords > 0) ? this._first + 1 : 0))
.replace("{last}", String(Math.min(this._first + this.rows, this.totalRecords)))
.replace("{rows}", String(this.rows))
.replace("{totalRecords}", String(this.totalRecords));

0 comments on commit b69e360

Please sign in to comment.