Skip to content

Commit 688904c

Browse files
committed
fix(pivot): added IgxPivotGridRow class
1 parent 4b7eb51 commit 688904c

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

projects/igniteui-angular/src/lib/grids/grid-public-row.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,3 +791,28 @@ export class IgxSummaryRow implements RowType {
791791
return row;
792792
}
793793
}
794+
795+
export class IgxPivotGridRow extends BaseRow {
796+
/**
797+
* @hidden
798+
*/
799+
constructor(
800+
public override grid: GridType,
801+
public override index: number, data?: any
802+
) {
803+
super();
804+
this._data = data && data.addRow && data.recordRef ? data.recordRef : data;
805+
}
806+
807+
/**
808+
* Gets the rendered cells in the row component.
809+
*/
810+
public override get cells(): CellType[] {
811+
const res: CellType[] = [];
812+
this.grid.columns.forEach(col => {
813+
const cell: CellType = new IgxGridCell(this.grid, this.index, col);
814+
res.push(cell);
815+
});
816+
return res;
817+
}
818+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ import { IgxTextHighlightService } from '../../directives/text-highlight/text-hi
102102
import { IgxPivotRowHeaderGroupComponent } from './pivot-row-header-group.component';
103103
import { IgxPivotDateDimension } from './pivot-grid-dimensions';
104104
import { IgxPivotRowDimensionMrlRowComponent } from './pivot-row-dimension-mrl-row.component';
105-
import { IgxGridRow } from '../grid-public-row';
105+
import { IgxPivotGridRow } from '../grid-public-row';
106106

107107
let NEXT_ID = 0;
108108
const MINIMUM_COLUMN_WIDTH = 200;
@@ -2526,7 +2526,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
25262526

25272527

25282528
if (!row && rec) {
2529-
row = new IgxGridRow(this, index, rec);
2529+
row = new IgxPivotGridRow(this, index, rec);
25302530
}
25312531
return row;
25322532
}

0 commit comments

Comments
 (0)