Skip to content

Commit 422a6b2

Browse files
authored
Merge branch 'master' into mkirova/row-pinning-editing
2 parents 6152abb + 5b82df1 commit 422a6b2

File tree

4 files changed

+464
-568
lines changed

4 files changed

+464
-568
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ All notable changes for each version of this project will be documented in this
1414
### New Features
1515

1616
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
17+
- Added ability to pin rows to top or bottom depending on the new `pinning` input.
18+
And new API methods `pinRow` and `unpinRow`.
19+
```html
20+
<igx-grid [data]="data" [pinning]="pinningConfiguration"></igx-grid>
21+
```
22+
```typescript
23+
public pinningConfiguration: IPinningConfig = { rows: RowPinningPosition.Bottom };
24+
```
25+
```typescript
26+
this.grid.pinRow(rowID);
27+
```
1728
- Added support for pinning columns on the right. Change the position of pinning using the new `pinning` input.
1829
```html
1930
<igx-grid [data]="data" [pinning]="pinningConfiguration"></igx-grid>

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

+26
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { DefaultSortingStrategy } from '../../data-operations/sorting-strategy';
1313
import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition';
1414
import { configureTestSuite } from '../../test-utils/configure-suite';
1515
import { IgxGridHeaderComponent } from '../headers/grid-header.component';
16+
import { GridSummaryFunctions } from '../../test-utils/grid-functions.spec';
1617

1718
const GRID_COL_THEAD_TITLE_CLASS = 'igx-grid__th-title';
1819
const GRID_COL_GROUP_THEAD_TITLE_CLASS = 'igx-grid__thead-title';
@@ -179,6 +180,8 @@ describe('IgxGrid - multi-column headers #grid', () => {
179180
expect(getColGroup(grid, 'General Information').hidden).toEqual(false);
180181
}));
181182

183+
184+
182185
it('Width should be correct. Column group with column. No width.', fakeAsync(/** height/width setter rAF */() => {
183186
const fixture = TestBed.createComponent(OneGroupOneColGridComponent);
184187
fixture.detectChanges();
@@ -1215,6 +1218,28 @@ describe('IgxGrid - multi-column headers #grid', () => {
12151218
expect(grid.getCellByColumn(4, 'Country').value).toEqual('Sweden');
12161219
}));
12171220

1221+
it('summaries - verify summaries when there are grouped columns', fakeAsync(() => {
1222+
const fixture = TestBed.createComponent(ColumnGroupFourLevelTestComponent);
1223+
fixture.detectChanges();
1224+
const grid = fixture.componentInstance.grid;
1225+
const allColumns = grid.columnList;
1226+
allColumns.forEach((col) => {
1227+
if (!col.columnGroup) {
1228+
col.hasSummary = true;
1229+
}
1230+
});
1231+
fixture.detectChanges();
1232+
1233+
const summaryRow = GridSummaryFunctions.getRootSummaryRow(fixture);
1234+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 0, ['Count'], ['27']);
1235+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 1, ['Count'], ['27']);
1236+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 2, ['Count'], ['27']);
1237+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 3, ['Count'], ['27']);
1238+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 4, ['Count'], ['27']);
1239+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 5, ['Count'], ['27']);
1240+
GridSummaryFunctions.verifyColumnSummaries(summaryRow, 6, ['Count'], ['27']);
1241+
}));
1242+
12181243
it('filtering - filter a grouped column', fakeAsync(() => {
12191244
const fixture = TestBed.createComponent(ColumnGroupFourLevelTestComponent);
12201245
fixture.detectChanges();
@@ -1275,6 +1300,7 @@ describe('IgxGrid - multi-column headers #grid', () => {
12751300
}));
12761301

12771302

1303+
12781304
it('grouping - verify grouping when there are grouped columns', fakeAsync(/** height/width setter rAF */() => {
12791305
const fixture = TestBed.createComponent(ColumnGroupGroupingTestComponent);
12801306
fixture.detectChanges();

0 commit comments

Comments
 (0)