Skip to content

Commit e5f6c09

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Move dataView caching to last pipe.
1 parent d1a8ba2 commit e5f6c09

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.pipes.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class IgxPivotRowPipe implements PipeTransform {
5151
})
5252
export class IgxPivotRowExpansionPipe implements PipeTransform {
5353

54-
constructor() { }
54+
constructor(@Inject(IGX_GRID_BASE) private grid?: GridType) { }
5555

5656
public transform(
5757
collection: any[],
@@ -74,6 +74,10 @@ export class IgxPivotRowExpansionPipe implements PipeTransform {
7474
}
7575
const finalData = config.columnStrategy ? data : data.filter(x => x[pivotKeys.records]);
7676
this.cleanState(finalData, pivotKeys);
77+
78+
if (this.grid) {
79+
this.grid.setFilteredSortedData(finalData, false);
80+
}
7781
return finalData;
7882
}
7983

@@ -168,7 +172,6 @@ export class IgxPivotGridFilterPipe implements PipeTransform {
168172
pure: true
169173
})
170174
export class IgxPivotGridColumnSortingPipe implements PipeTransform {
171-
constructor(@Inject(IGX_GRID_BASE) private grid: GridType) { }
172175
public transform(
173176
collection: any[],
174177
expressions: ISortingExpression[],
@@ -183,7 +186,6 @@ export class IgxPivotGridColumnSortingPipe implements PipeTransform {
183186
} else {
184187
result = PivotUtil.sort(cloneArray(collection, true), expressions, sorting, pivotKeys);
185188
}
186-
this.grid.setFilteredSortedData(result, false);
187189
return result;
188190
}
189191
}

0 commit comments

Comments
 (0)