Skip to content

Commit e98ba77

Browse files
authored
Merge branch '9.0.x' into hPopov/refactor-hGrid-selection-tests-90x
2 parents eb2c044 + 0922535 commit e98ba77

File tree

14 files changed

+447
-451
lines changed

14 files changed

+447
-451
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5+
## 9.0.9
6+
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
7+
- The `title` attribute of the columns and the column groups is now used as `title` for the header text.
8+
59
## 9.0.1
610
- **Breaking Changes**
711
- Remove `$base-color` from igx-typography. The igx-typography class now inherits the parent color.

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_tooltip.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ $_fluent-tooltip: extend(
4646
$_fluent-shape-tooltip,
4747
(
4848
background: (
49-
igx-color: 'surface'
49+
igx-color: ('grays', 900)
50+
),
51+
text-color: (
52+
igx-contrast-color: ('grays', 900)
5053
)
5154
)
5255
);

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
TemplateRef,
1111
Output,
1212
EventEmitter,
13+
ElementRef,
1314
} from '@angular/core';
1415
import { notifyChanges } from '../watch-changes';
1516
import { WatchColumnChanges } from '../watch-changes';
@@ -1238,7 +1239,7 @@ export class IgxColumnComponent implements AfterContentInit {
12381239
protected collapseIndicatorTemplate: IgxCollapsibleIndicatorTemplateDirective;
12391240

12401241
constructor(public gridAPI: GridBaseAPIService<IgxGridBaseDirective & GridType>, public cdr: ChangeDetectorRef,
1241-
public rowIslandAPI: IgxRowIslandAPIService) { }
1242+
public rowIslandAPI: IgxRowIslandAPIService, public elementRef: ElementRef) { }
12421243

12431244
/**
12441245
* @hidden

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,23 @@ describe('IgxGrid - multi-column headers #grid', () => {
15691569

15701570
expect(grid.columnList.length).toEqual(10);
15711571
});
1572+
1573+
it('should set title attribute on column group header spans', () => {
1574+
const fixture = TestBed.createComponent(ColumnGroupTestComponent);
1575+
fixture.detectChanges();
1576+
1577+
const grid = fixture.componentInstance.grid;
1578+
const generalGroup = grid.columnList.find(c => c.header === 'General Information');
1579+
generalGroup.elementRef.nativeElement.title = 'General Information Title';
1580+
fixture.detectChanges();
1581+
1582+
const headers = fixture.debugElement.queryAll(By.css('.' + GRID_COL_GROUP_THEAD_TITLE_CLASS));
1583+
const generalHeader = headers.find(h => h.nativeElement.textContent === 'General Information');
1584+
const addressHeader = headers.find(h => h.nativeElement.textContent === 'Address Information');
1585+
1586+
expect(generalHeader.nativeElement.firstElementChild.title).toBe('General Information Title');
1587+
expect(addressHeader.nativeElement.firstElementChild.title).toBe('Address Information');
1588+
});
15721589
});
15731590

15741591
@Component({

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,29 @@ describe('IgxGrid - Column properties #grid', () => {
375375
const row = grid.getRowByIndex(0);
376376
row.cells.forEach(cell => expect(cell.nativeElement.getAttribute('style')).toMatch('background: black'));
377377
});
378+
379+
it('should set title attribute on column header spans', () => {
380+
const fix = TestBed.createComponent(ColumnsFromIterableComponent);
381+
fix.detectChanges();
382+
383+
const grid = fix.componentInstance.instance;
384+
const idColumn = grid.getColumnByName('ID');
385+
const nameColumn = grid.getColumnByName('Name');
386+
387+
idColumn.header = 'ID Header';
388+
idColumn.elementRef.nativeElement.title = 'ID Title';
389+
nameColumn.header = 'Name Header';
390+
fix.detectChanges();
391+
392+
const headers = fix.debugElement.queryAll(By.css(COLUMN_HEADER_CLASS));
393+
const idHeader = headers[0].nativeElement;
394+
const nameHeader = headers[1].nativeElement;
395+
expect(idHeader.textContent).toBe('ID Header');
396+
expect(idHeader.firstElementChild.firstElementChild.title).toBe('ID Title');
397+
expect(nameHeader.textContent).toBe('Name Header');
398+
expect(nameHeader.firstElementChild.firstElementChild.title).toBe('Name Header');
399+
});
400+
378401
});
379402

380403
@Component({

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ describe('IgxGrid - Row Editing #grid', () => {
11361136
tick(16);
11371137

11381138
const cell = grid.getCellByColumn(0, 'ProductName');
1139-
const select = fix.debugElement.query(By.css('igx-select')).nativeElement;
1139+
const select = GridFunctions.getGridPageSelectElement(fix);
11401140

11411141
cell.setEditMode(true);
11421142
// cell.update('IG');
@@ -1168,7 +1168,7 @@ describe('IgxGrid - Row Editing #grid', () => {
11681168

11691169
const gridElement: HTMLElement = grid.nativeElement;
11701170
let cell = grid.getCellByColumn(3, 'ProductName');
1171-
const select = fix.debugElement.query(By.css('igx-select')).nativeElement;
1171+
const select = GridFunctions.getGridPageSelectElement(fix);
11721172

11731173
cell.setEditMode(true);
11741174
tick(16);

0 commit comments

Comments
 (0)