Skip to content

Commit

Permalink
fix(data-table): Fix pagination not displaying any rows if `currentFi…
Browse files Browse the repository at this point in the history
…rstRow` is < 1
  • Loading branch information
maicol07 committed Aug 17, 2023
1 parent 6e17b29 commit 6b8ad3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data-table/lib/data-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ export class DataTable extends BaseElement {
case 'previous':
this.currentFirstRow -= this.currentPageSize;
this.currentLastRow -= this.currentPageSize;
if (this.currentFirstRow < 1) {
this.currentFirstRow = 1;
this.currentLastRow = this.currentPageSize;
}
break;
case 'next':
this.currentFirstRow += this.currentPageSize;
Expand Down

0 comments on commit 6b8ad3c

Please sign in to comment.