Skip to content

Commit

Permalink
Merge pull request #19466 from abpframework/sinan/ngx-directive
Browse files Browse the repository at this point in the history
Fix condition to check if table rows exist
  • Loading branch information
masumulu28 committed Apr 1, 2024
2 parents b4bf6f1 + 3b11c33 commit a8d92ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class NgxDatatableListDirective implements OnChanges, OnInit, DoCheck {
}

protected refreshPageIfDataExist() {
if (this.table.rows.length < 1 && this.table.count > 0) {
if (this.table.rows?.length < 1 && this.table.count > 0) {
let maxPage = Math.floor(Number(this.table.count / this.list.maxResultCount));

if (this.table.count < this.list.maxResultCount) {
Expand Down

0 comments on commit a8d92ad

Please sign in to comment.