Skip to content

Commit 346c14d

Browse files
authored
Merge pull request #7197 from IgniteUI/mkirova/fix-empty-message-pinning
fix(igxGrid): Fix issue with empty filter result message rendering wh…
2 parents 1357bcb + f067676 commit 346c14d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2932,7 +2932,8 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
29322932
if (this.hasPinnedRecords && pinned) {
29332933
this._filteredPinnedData = data || [];
29342934
const filteredUnpinned = this._filteredUnpinnedData || [];
2935-
this.filteredData = [... this._filteredPinnedData, ... filteredUnpinned];
2935+
const filteredData = [... this._filteredPinnedData, ... filteredUnpinned];
2936+
this.filteredData = filteredData.length > 0 ? filteredData : this._filteredUnpinnedData;
29362937
} else if (this.hasPinnedRecords && !pinned) {
29372938
this._filteredUnpinnedData = data;
29382939
} else {

src/app/grid-row-pinning/grid-row-pinning.sample.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181

8282
<div class="sample-column">
8383
<div>igxTreeGrid</div>
84-
<igx-tree-grid [pinning]="pinningConfig" #treegrid [allowFiltering]='true' [data]="treeData" primaryKey="employeeID" foreignKey="PID" [rowSelectable]="true"
84+
<igx-tree-grid [paging]='true' [pinning]="pinningConfig" #treegrid [allowFiltering]='true' [data]="treeData" primaryKey="employeeID" foreignKey="PID" [rowSelectable]="true"
8585
[width]="'900px'" [height]="'800px'" [showToolbar]="true"
8686
[columnHiding]="true" [columnPinning]="true" [exportExcel]="true" [exportCsv]="true" exportText="Export"
8787
>
@@ -94,7 +94,7 @@
9494
</igx-column>
9595
<igx-column *ngFor="let c of treeColumns" [field]="c.field" [dataType]="c.dataType" [header]="c.label"
9696
[pinned]="c.pinned" [movable]="c.movable" [groupable]="false" [resizable]="c.resizable" [width]="c.width"
97-
[sortable]="true" [filterable]="true" [editable]="true" [hidden]="c.hidden" [hasSummary]="c.hasSummary"
97+
[sortable]="true" [filterable]="true" [editable]="true" [hidden]="c.hidden"
9898
[minWidth]="c.minWidth" [maxWidth]="c.maxWidth">
9999
</igx-column>
100100

0 commit comments

Comments
 (0)