Skip to content

Commit edde933

Browse files
authored
Merge branch '10.2.x' into grid-cell-edit-styling
2 parents 2aa284a + 0c1bd8c commit edde933

File tree

5 files changed

+61
-13
lines changed

5 files changed

+61
-13
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ master, 9.1.x, 10.0.x, 10.1.x ]
8+
branches: [ master, '[0-9]+.[0-9]+.x' ]
99
pull_request:
10-
branches: [ master, 9.1.x, 10.0.x, 10.1.x ]
10+
branches: [ master, '[0-9]+.[0-9]+.x' ]
1111

1212
jobs:
1313
build:

projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-editing-actions.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ describe('igxGridEditingActions #grid ', () => {
139139
actionStrip = fixture.componentInstance.actionStrip;
140140
grid = fixture.componentInstance.grid;
141141
}));
142-
it('should auto-show on mouse over of row.', () => {
142+
it('should auto-show on mouse enter of row.', () => {
143143
const row = grid.getRowByIndex(0);
144144
const rowElem = row.nativeElement;
145-
UIInteractions.simulateMouseEvent('mouseover', rowElem, 0, 0);
145+
UIInteractions.simulateMouseEvent('mouseenter', rowElem, 0, 0);
146146
fixture.detectChanges();
147147

148148
expect(actionStrip.context).toBe(row);
@@ -171,18 +171,18 @@ describe('igxGridEditingActions #grid ', () => {
171171
hierarchicalGrid = fixture.componentInstance.hgrid;
172172
}));
173173

174-
it('should auto-show root actionStrip on mouse over of root row.', () => {
174+
it('should auto-show root actionStrip on mouse enter of root row.', () => {
175175
const row = hierarchicalGrid.getRowByIndex(0);
176176
const rowElem = row.nativeElement;
177-
UIInteractions.simulateMouseEvent('mouseover', rowElem, 0, 0);
177+
UIInteractions.simulateMouseEvent('mouseenter', rowElem, 0, 0);
178178
fixture.detectChanges();
179179

180180
expect(actionStripRoot.context).toBe(row);
181181
expect(actionStripRoot.hidden).toBeFalse();
182182
expect(actionStripChild.context).toBeUndefined();
183183
});
184184

185-
it('should auto-show row island actionStrip on mouse over of child row.', () => {
185+
it('should auto-show row island actionStrip on mouse enter of child row.', () => {
186186
const row = hierarchicalGrid.getRowByIndex(0) as IgxHierarchicalRowComponent;
187187
row.toggle();
188188
fixture.detectChanges();
@@ -191,7 +191,7 @@ describe('igxGridEditingActions #grid ', () => {
191191

192192
const childRow = childGrid.getRowByIndex(0);
193193
const rowElem = childRow.nativeElement;
194-
UIInteractions.simulateMouseEvent('mouseover', rowElem, 0, 0);
194+
UIInteractions.simulateMouseEvent('mouseenter', rowElem, 0, 0);
195195
fixture.detectChanges();
196196

197197
expect(actionStripChild.context).toBe(childRow);

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-search.component.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,19 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
250250
* @hidden @internal
251251
*/
252252
public onInputKeyDown(event): void {
253-
if (event.key === KEYS.ENTER) {
254-
event.preventDefault();
255-
this.applyFilter();
253+
switch (event.key) {
254+
case KEYS.ENTER:
255+
event.preventDefault();
256+
this.applyFilter();
257+
258+
return;
259+
case KEYS.ESCAPE || KEYS.ESCAPE_IE:
260+
if (this.searchValue) {
261+
event.stopPropagation();
262+
this.clearInput();
263+
}
264+
265+
return;
256266
}
257267
}
258268

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

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4587,6 +4587,11 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
45874587
// Open excel style filtering dialog.
45884588
GridFunctions.clickExcelFilterIconFromCode(fix, grid, 'Downloads');
45894589

4590+
let excelMenu = GridFunctions.getExcelStyleFilteringComponent(fix);
4591+
4592+
// Verify ESF is visible.
4593+
expect(excelMenu).not.toBeNull();
4594+
45904595
// Type string in search box.
45914596
const searchComponent = GridFunctions.getExcelStyleSearchComponent(fix);
45924597
const inputNativeElement = GridFunctions.getExcelStyleSearchComponentInput(fix, searchComponent);
@@ -4609,10 +4614,43 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
46094614
.sort();
46104615

46114616
// Verify that excel style filtering dialog is closed and data is filtered.
4612-
expect(fix.debugElement.query(By.css(FILTER_UI_ROW))).toBeNull();
4617+
excelMenu = GridFunctions.getExcelStyleFilteringComponent(fix);
4618+
expect(excelMenu).toBeNull();
46134619
expect(gridCellValues.length).toEqual(4);
46144620
expect(gridCellValues).toEqual(listItems);
46154621
}));
4622+
4623+
it('Should clear input if there is text and \'Escape\' is pressed.', fakeAsync(() => {
4624+
// Open excel style filtering dialog.
4625+
GridFunctions.clickExcelFilterIconFromCode(fix, grid, 'Downloads');
4626+
4627+
let inputNativeElement = GridFunctions.getExcelStyleSearchComponentInput(fix);
4628+
let excelMenu = GridFunctions.getExcelStyleFilteringComponent(fix);
4629+
4630+
// Verify ESF is visible.
4631+
expect(excelMenu).not.toBeNull();
4632+
4633+
// Verify that the dialog is closed on pressing Escape.
4634+
inputNativeElement.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
4635+
excelMenu = GridFunctions.getExcelStyleFilteringComponent(fix);
4636+
expect(excelMenu).toBeNull();
4637+
4638+
// Open excel style filtering dialog again and type in the input.
4639+
GridFunctions.clickExcelFilterIconFromCode(fix, grid, 'Downloads');
4640+
inputNativeElement = GridFunctions.getExcelStyleSearchComponentInput(fix);
4641+
4642+
UIInteractions.clickAndSendInputElementValue(inputNativeElement, '2', fix);
4643+
4644+
// Press Escape again and verify that ESF menu is still visible and the input is empty
4645+
inputNativeElement.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
4646+
inputNativeElement = GridFunctions.getExcelStyleSearchComponentInput(fix);
4647+
fix.detectChanges();
4648+
flush();
4649+
4650+
excelMenu = GridFunctions.getExcelStyleFilteringComponent(fix);
4651+
expect(excelMenu).not.toBeNull();
4652+
expect(inputNativeElement.value).toBe('', 'input isn\'t cleared correctly');
4653+
}));
46164654
});
46174655

46184656
describe('Templates: ', () => {

projects/igniteui-angular/src/lib/grids/row.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export class IgxRowDirective<T extends IgxGridBaseDirective & GridType> implemen
396396
* @hidden
397397
* @internal
398398
*/
399-
@HostListener('mouseover', ['$event'])
399+
@HostListener('mouseenter', ['$event'])
400400
public showActionStrip(event: MouseEvent) {
401401
if (this.grid.actionStrip) {
402402
this.grid.actionStrip.show(this);

0 commit comments

Comments
 (0)