From 417e051a3a113ac8578466e999e81769b9301b17 Mon Sep 17 00:00:00 2001 From: nzbin Date: Thu, 16 May 2024 23:25:44 +0800 Subject: [PATCH] refactor(grid): use dataSource to check empty data --- projects/extensions/grid/grid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/extensions/grid/grid.ts b/projects/extensions/grid/grid.ts index 974b96bc..5615fa8f 100755 --- a/projects/extensions/grid/grid.ts +++ b/projects/extensions/grid/grid.ts @@ -397,7 +397,7 @@ export class MtxGrid implements OnChanges, AfterViewInit, OnDestroy { @Input() noResultTemplate!: TemplateRef; get _hasNoResult() { - return (!this.data || this.data.length === 0) && !this.loading; + return (!this.dataSource.data || this.dataSource.data.length === 0) && !this.loading; } // ===== Cell Templates =====