Skip to content

Commit f4713ce

Browse files
committed
chore(*): Merge upstream master
2 parents 3ccc0b9 + 0b9be32 commit f4713ce

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4839,10 +4839,6 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
48394839
const selectionMap = Array.from(this.selectionService.selection)
48404840
.filter((tuple) => tuple[0] < source.length);
48414841

4842-
const visibleColumns = this.visibleColumns
4843-
.filter(col => !col.columnGroup)
4844-
.sort((a, b) => a.visibleIndex - b.visibleIndex);
4845-
48464842

48474843
for (const [row, set] of selectionMap) {
48484844
if (!source[row]) {

projects/igniteui-angular/src/lib/grids/grid/grid.multi-row-layout.integration.spec.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,42 @@ describe('IgxGrid - multi-row-layout Integration - ', () => {
11101110
expect(groupRowBlocks[0].nativeElement.style.gridTemplateColumns).toEqual('200px 200px 650px 50px 100px 200px');
11111111
});
11121112
});
1113+
1114+
describe('Selection ', () => {
1115+
beforeEach(async(() => {
1116+
fixture = TestBed.createComponent(ColumnLayoutGroupingTestComponent);
1117+
fixture.detectChanges();
1118+
grid = fixture.componentInstance.grid;
1119+
colGroups = fixture.componentInstance.colGroups;
1120+
}));
1121+
1122+
it('should return correct selected data via getSelectedData API.', () => {
1123+
const selectedData1 = [{
1124+
ID: 'ALFKI',
1125+
CompanyName: 'Alfreds Futterkiste',
1126+
ContactName: 'Maria Anders',
1127+
ContactTitle: 'Sales Representative'
1128+
}];
1129+
const selectedData2 = [{
1130+
PostalCode: '05021',
1131+
City: 'México D.F.',
1132+
Country: 'Mexico',
1133+
Address: 'Avda. de la Constitución 2222'
1134+
}];
1135+
let cell = grid.getCellByColumn(0, 'CompanyName');
1136+
UIInteractions.clickElement(cell);
1137+
fixture.detectChanges();
1138+
1139+
expect(grid.getSelectedData()).toEqual(selectedData1);
1140+
1141+
cell = grid.getCellByColumn(1, 'City');
1142+
UIInteractions.clickElement(cell);
1143+
fixture.detectChanges();
1144+
1145+
expect(grid.getSelectedData()).toEqual(selectedData2);
1146+
});
1147+
});
1148+
11131149
});
11141150

11151151
@Component({

0 commit comments

Comments
 (0)