Skip to content

Commit 1c72914

Browse files
authored
Merge pull request #7262 from IgniteUI/pbozhinov/fix-7261
Fixes errors in setFilteredSortedData when data is undefined
2 parents 5bfbc87 + ce2a81f commit 1c72914

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2998,7 +2998,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
29982998
* @internal
29992999
*/
30003000
public setFilteredSortedData(data, pinned: boolean) {
3001-
data = data.map(rec => rec.ghostRecord !== undefined ? rec.recordRef : rec);
3001+
data = data || [];
30023002
if (this._pinnedRecordIDs.length > 0 && pinned) {
30033003
this._filteredSortedPinnedData = data;
30043004
this.pinnedRecords = data;
@@ -5195,7 +5195,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
51955195
* ```
51965196
*/
51975197
get unpinnedDataView(): any[] {
5198-
return this.unpinnedRecords ? this.unpinnedRecords : this.verticalScrollContainer.igxForOf;
5198+
return this.unpinnedRecords ? this.unpinnedRecords : this.verticalScrollContainer.igxForOf || [];
51995199
}
52005200

52015201
/**

0 commit comments

Comments
 (0)