Skip to content

Commit acda8f5

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Add custom trackChanges function to account for detail data generated from the data pipes.
1 parent f82b923 commit acda8f5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
let-rowIndex="index" [igxForScrollOrientation]="'vertical'" [igxForScrollContainer]='verticalScroll'
116116
[igxForContainerSize]='calcHeight'
117117
[igxForItemSize]="hasColumnLayouts ? rowHeight * multiRowLayoutRowSize + 1 : renderedRowHeight"
118+
[igxForTrackBy]='trackChanges'
118119
#verticalScrollContainer (onChunkPreload)="dataLoading($event)">
119120
<ng-template
120121
[igxTemplateOutlet]='getRowTemplate(rowData)'

projects/igniteui-angular/src/lib/grids/grid/grid.component.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,16 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
687687
}
688688
}
689689

690+
/**
691+
* @hidden
692+
*/
693+
public trackChanges(index, rec) {
694+
if (rec.detailsData !== undefined) {
695+
return rec.detailsData;
696+
}
697+
return rec;
698+
}
699+
690700
public detailsKeyboardHandler(event, rowIndex, container) {
691701
const colIndex = this.selectionService.activeElement ? this.selectionService.activeElement.column : 0;
692702
const shift = event.shiftKey;

0 commit comments

Comments
 (0)