Skip to content

Commit ad0a6aa

Browse files
ddinchevahanastasovdobromirts
authored
fix(PivotGrid): extract the copied data correctly #12719 (#12737)
Co-authored-by: Hristo <[email protected]> Co-authored-by: dobromirts <[email protected]>
1 parent 8c3734b commit ad0a6aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7277,9 +7277,10 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
72777277
columnsArray = this.getSelectableColumnsAt(each);
72787278
columnsArray.forEach((col) => {
72797279
if (col) {
7280-
const key = headers ? col.header || col.field : col.field;
7280+
const key = !this.isPivot && headers ? col.header || col.field : col.field;
72817281
const rowData = source[row].ghostRecord ? source[row].recordRef : source[row];
7282-
const value = resolveNestedPath(rowData, col.field);
7282+
const value = this.isPivot ? rowData.aggregationValues.get(col.field)
7283+
: resolveNestedPath(rowData, col.field);
72837284
record[key] = formatters && col.formatter ? col.formatter(value, rowData) : value;
72847285
if (columnData) {
72857286
if (!record[key]) {

0 commit comments

Comments
 (0)