Skip to content

Commit 8591320

Browse files
committed
fix(grid-filtering): close filtering row with ctrl + shift + l
1 parent ece3c07 commit 8591320

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

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

+11-7
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,14 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
175175
this.input.nativeElement.focus();
176176
}
177177

178-
@HostListener('keydown.esc', ['$event'])
179-
public onEscHandler(evt) {
180-
evt.preventDefault();
181-
evt.stopPropagation();
182-
this.close();
178+
@HostListener('keydown', ['$event'])
179+
public onKeydownHandler(evt) {
180+
if (evt.key === KEYS.ESCAPE || evt.key === KEYS.ESCAPE_IE ||
181+
evt.ctrlKey && evt.shiftKey && evt.key.toLowerCase() === 'l') {
182+
evt.preventDefault();
183+
evt.stopPropagation();
184+
this.close();
185+
}
183186
}
184187

185188
get disabled(): boolean {
@@ -260,8 +263,9 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
260263
} else if (event.altKey && (event.key === KEYS.DOWN_ARROW || event.key === KEYS.DOWN_ARROW_IE)) {
261264
this.inputGroupPrefix.nativeElement.focus();
262265
this.toggleConditionsDropDown(this.inputGroupPrefix.nativeElement);
263-
} else if (event.key === KEYS.ESCAPE || event.key === KEYS.ESCAPE_IE) {
264-
this.close();
266+
} else if (event.key === KEYS.ESCAPE || event.key === KEYS.ESCAPE_IE ||
267+
event.ctrlKey && event.shiftKey && event.key.toLowerCase() === 'l') {
268+
this.close();
265269
}
266270
}
267271

0 commit comments

Comments
 (0)