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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
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) { |
|
|
|
|