Browse Source

Merge pull request #19466 from abpframework/sinan/ngx-directive

Fix condition to check if table rows exist
pull/19467/head
Masum ULU 2 years ago
committed by GitHub
parent
commit
a8d92ad0fd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts

2
npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts

@ -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) {

Loading…
Cancel
Save