Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
8f5e00b
fix(pivot-grid): added createRow method for grid based events
tishko0 Jan 7, 2025
e0f02a8
fix(pivot-grid): update import paths and add cell click event test
tishko0 Jan 9, 2025
b769f33
Merge branch 'master' into ttonev/fix-14970-master
tishko0 Jan 9, 2025
f9cf56b
fix(pivot): added IgxPivotGridRow
tishko0 Jan 28, 2025
d3fa618
Merge branch 'ttonev/fix-14970-master' of https://github.com/IgniteUI…
tishko0 Jan 28, 2025
44b6372
fix(pivot-grid): refactor IgxPivotGridRow to implement RowType
tishko0 Feb 13, 2025
ac6d96e
Merge branch 'master' into ttonev/fix-14970-master
tishko0 Feb 19, 2025
74273a1
fix(grid): added comments to public properties
tishko0 Feb 26, 2025
25ba2c0
Merge branch 'ttonev/fix-14970-master' of https://github.com/IgniteUI…
tishko0 Feb 26, 2025
51c76a4
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
tishko0 Mar 11, 2025
0099109
fix(grid): fixed key property
tishko0 Mar 13, 2025
f686d6e
fix(grid): update import path for IgxPivotGridComponent
tishko0 Mar 20, 2025
5630b93
fix(grid): update import path
tishko0 Mar 20, 2025
24eb27e
Merge branch 'master' into ttonev/fix-14970-master
tishko0 Apr 1, 2025
d2458cd
Merge branch '19.2.x' into ttonev/fix-14970-master
tishko0 Apr 28, 2025
1ae9b03
Merge branch '19.2.x' into ttonev/fix-14970-master
dkamburov Jun 16, 2025
bcf2777
Merge branch '19.2.x' into ttonev/fix-14970-master
dkamburov Jun 20, 2025
e2bdc9f
chore(elements): try fixing the build by updating elements config
dkamburov Jun 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ import { IgxTextHighlightService } from '../../directives/text-highlight/text-hi
import { IgxPivotRowHeaderGroupComponent } from './pivot-row-header-group.component';
import { IgxPivotDateDimension } from './pivot-grid-dimensions';
import { IgxPivotRowDimensionMrlRowComponent } from './pivot-row-dimension-mrl-row.component';
import { IgxGridRow } from '../grid-public-row';

let NEXT_ID = 0;
const MINIMUM_COLUMN_WIDTH = 200;
Expand Down Expand Up @@ -2510,4 +2511,20 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
this.regroupTrigger++;
}
}

/**
* @hidden @internal
*/
public createRow(index: number, data?: any): RowType {
let row: RowType;

const dataIndex = this._getDataViewIndex(index);
const rec = data ?? this.dataView[dataIndex];


if (!row && rec) {
row = new IgxGridRow(this, index, rec);
}
return row;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { FilteringExpressionsTree, FilteringLogic, GridColumnDataType, IgxIconComponent, IgxPivotGridComponent, IgxStringFilteringOperand } from 'igniteui-angular';
import { CellType, FilteringExpressionsTree, FilteringLogic, GridColumnDataType, IGridCellEventArgs, IgxIconComponent, IgxPivotGridComponent, IgxStringFilteringOperand } from 'igniteui-angular';
import { IgxChipComponent } from '../../chips/chip.component';
import { IgxChipsAreaComponent } from '../../chips/chips-area.component';
import { DefaultPivotSortingStrategy } from '../../data-operations/pivot-sort-strategy';
Expand All @@ -23,6 +23,7 @@ import { Size } from '../common/enums';
import { setElementSize } from '../../test-utils/helper-utils.spec';
import { IgxPivotRowDimensionMrlRowComponent } from './pivot-row-dimension-mrl-row.component';
import { IgxPivotRowDimensionContentComponent } from './pivot-row-dimension-content.component';
import { IgxGridCellComponent } from '../cell.component';

const CSS_CLASS_LIST = 'igx-drop-down__list';
const CSS_CLASS_ITEM = 'igx-drop-down__item';
Expand Down Expand Up @@ -2105,8 +2106,23 @@ describe('IgxPivotGrid #pivotGrid', () => {

expect(pivotGrid.rowList.length).toBe(10);
});
});

it('should have the correct IGridCellEventArgs when clicking on a cell', () => {
const pivotGrid = fixture.componentInstance.pivotGrid;
spyOn(pivotGrid.cellClick, 'emit').and.callThrough();
fixture.detectChanges();

const cell = pivotGrid.gridAPI.get_cell_by_index(0, 'Bulgaria-UnitsSold') as CellType;

pivotGrid.cellClick.emit({ cell, event: null });
cell.nativeElement.click();
const cellClickargs: IGridCellEventArgs = { cell, event: new MouseEvent('click') };

const gridCell = cellClickargs.cell as IgxGridCellComponent;
const firstEntry = gridCell.rowData.aggregationValues.entries().next().value;
expect(firstEntry).toEqual(['USA-UnitsSold', 829]);
});
});
});

describe('IgxPivotGrid complex hierarchy #pivotGrid', () => {
Expand Down
Loading