Skip to content

Commit c5217b4

Browse files
committed
feat(adv-filtering): close context menu on escape #5496
1 parent 4f8f1b8 commit c5217b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/igniteui-angular/src/lib/grids/filtering/advanced-filtering/advanced-filtering-dialog.component.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,12 @@ export class IgxAdvancedFilteringDialogComponent implements AfterViewInit, OnDes
566566
}
567567
}
568568

569-
public onKeyDown(eventArgs) {
569+
public onKeyDown(eventArgs: KeyboardEvent) {
570570
eventArgs.stopPropagation();
571+
if (!this.contextMenuToggle.collapsed &&
572+
(eventArgs.key === KEYS.ESCAPE || eventArgs.key === KEYS.ESCAPE_IE)) {
573+
this.clearSelection();
574+
}
571575
}
572576

573577
public createAndGroup() {

0 commit comments

Comments
 (0)