Skip to content

Commit 7d30464

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Fix summary cell context.
1 parent e84e0d0 commit 7d30464

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

projects/igniteui-angular/src/lib/grids/summaries/summary-row.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
></div>
99
}
1010
@if (pinnedStartColumns.length > 0) {
11-
<ng-container *ngTemplateOutlet="summaryCellTemplate; context: getContext(this)"></ng-container>
11+
<ng-container *ngTemplateOutlet="summaryCellTemplate; context: getContext(this, pinnedStartColumns)"></ng-container>
1212
}
1313
<ng-template igxGridFor let-col [igxGridForOf]="unpinnedColumns | igxNotGrouped" [igxForScrollContainer]="grid.parentVirtDir" let-colIndex="index" [igxForScrollOrientation]="'horizontal'" [igxForContainerSize]="grid.unpinnedWidth" [igxForTrackBy]="grid.trackColumnChanges" [igxForSizePropName]='"calcPixelWidth"' #igxDirRef>
1414
<igx-grid-summary-cell
@@ -32,12 +32,12 @@
3232
</igx-grid-summary-cell>
3333
</ng-template>
3434
@if (pinnedEndColumns.length > 0) {
35-
<ng-container *ngTemplateOutlet="summaryCellTemplate; context: getContext(this)"></ng-container>
35+
<ng-container *ngTemplateOutlet="summaryCellTemplate; context: getContext(this, pinnedEndColumns)"></ng-container>
3636
}
3737
}
3838

39-
<ng-template #summaryCellTemplate let-col>
40-
@for (col of pinnedColumns | igxNotGrouped; track trackPinnedColumn(col)) {
39+
<ng-template #summaryCellTemplate let-col let-columns="columns">
40+
@for (col of columns | igxNotGrouped; track trackPinnedColumn(col)) {
4141
<igx-grid-summary-cell
4242
role="cell"
4343
class="igx-grid-summary igx-grid-summary--fw igx-grid-summary--pinned"

projects/igniteui-angular/src/lib/grids/summaries/summary-row.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ export class IgxSummaryRowComponent implements DoCheck {
130130
return this.grid.unpinnedColumns;
131131
}
132132

133-
public getContext(row) {
133+
public getContext(row, cols) {
134134
return {
135-
$implicit: row
135+
$implicit: row,
136+
columns: cols
136137
};
137138
}
138139

0 commit comments

Comments
 (0)