Skip to content

Commit

Permalink
refactor(grid): use dataSource to check empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbin committed May 16, 2024
1 parent d9ff555 commit 417e051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/extensions/grid/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
@Input() noResultTemplate!: TemplateRef<any>;

get _hasNoResult() {
return (!this.data || this.data.length === 0) && !this.loading;
return (!this.dataSource.data || this.dataSource.data.length === 0) && !this.loading;
}

// ===== Cell Templates =====
Expand Down

0 comments on commit 417e051

Please sign in to comment.