Skip to content

Commit 5de9867

Browse files
Merge pull request #16449 from IgniteUI/bpachilova/fix-pivot-cell-dataMapper-16445-19.2.x
fix(pivot-grid): do not use dataMapper for pivot row cell values - 19.2.x
2 parents e50b90c + 4366b58 commit 5de9867

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,22 @@ describe('IgxPivotGrid #pivotGrid', () => {
807807
expect(pivotGrid.nativeElement.clientWidth - expectedSize).toBeLessThan(50, "should take sum of columns as width.");
808808
});
809809

810+
it('should render cell values for dimension columns containing dots - issue #16445', () => {
811+
let data = fixture.componentInstance.data;
812+
data = data.map(item => {
813+
return {
814+
...item,
815+
Country: `${item['Country']}.Test`
816+
};
817+
});
818+
819+
fixture.componentInstance.data = [...data];
820+
fixture.detectChanges();
821+
822+
const cell = fixture.componentInstance.pivotGrid.gridAPI.get_cell_by_index(0, 'Bulgaria.Test-UnitsSold');
823+
expect(cell.value).not.toBeUndefined();
824+
});
825+
810826
describe('IgxPivotGrid Features #pivotGrid', () => {
811827
it('should show excel style filtering via dimension chip.', async () => {
812828
const pivotGrid = fixture.componentInstance.pivotGrid;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[rowData]="data" [columnData]='getColumnData(col)'
1515
[style.min-width]="col.resolvedWidth" [style.max-width]="col.resolvedWidth"
1616
[style.flex-basis]="col.resolvedWidth" [width]="col.getCellWidth()" [visibleColumnIndex]="col.visibleIndex"
17-
[value]="pivotAggregationData[col.field] | dataMapper:col.field:grid.pipeTrigger:pivotAggregationData[col.field]:col.hasNestedPath"
17+
[value]="pivotAggregationData[col.field]"
1818
[cellTemplate]="col.bodyTemplate" [lastSearchInfo]="grid.lastSearchInfo"
1919
[cellSelectionMode]="grid.cellSelection" [displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
2020
(pointerdown)="grid.navigation.focusOutRowHeader($event)">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { IgxGridSelectionService } from '../selection/selection.service';
1313
import { IPivotGridColumn, IPivotGridRecord } from './pivot-grid.interface';
1414
import { PivotUtil } from './pivot-util';
1515
import { IgxPivotGridCellStyleClassesPipe } from './pivot-grid.pipes';
16-
import { IgxGridNotGroupedPipe, IgxGridCellStylesPipe, IgxGridDataMapperPipe, IgxGridTransactionStatePipe } from '../common/pipes';
16+
import { IgxGridNotGroupedPipe, IgxGridCellStylesPipe, IgxGridTransactionStatePipe } from '../common/pipes';
1717
import { IgxCheckboxComponent } from '../../checkbox/checkbox.component';
1818
import { NgClass, NgStyle } from '@angular/common';
1919
import { IgxGridCellComponent } from '../cell.component';
@@ -24,7 +24,7 @@ import { IgxGridForOfDirective } from '../../directives/for-of/for_of.directive'
2424
selector: 'igx-pivot-row',
2525
templateUrl: './pivot-row.component.html',
2626
providers: [{ provide: IgxRowDirective, useExisting: forwardRef(() => IgxPivotRowComponent) }],
27-
imports: [IgxGridForOfDirective, IgxGridCellComponent, NgClass, NgStyle, IgxCheckboxComponent, IgxGridNotGroupedPipe, IgxGridCellStylesPipe, IgxGridDataMapperPipe, IgxGridTransactionStatePipe, IgxPivotGridCellStyleClassesPipe]
27+
imports: [IgxGridForOfDirective, IgxGridCellComponent, NgClass, NgStyle, IgxCheckboxComponent, IgxGridNotGroupedPipe, IgxGridCellStylesPipe, IgxGridTransactionStatePipe, IgxPivotGridCellStyleClassesPipe]
2828
})
2929
export class IgxPivotRowComponent extends IgxRowDirective {
3030
/**

0 commit comments

Comments
 (0)