[ACA-4422] Resolved - Edit Aspects Dialog should close when pressing ESC (#7022)

* [ACA-4422] Resolved - Edit Aspects Dialog should close when pressing ESC

* [ACA-4422] Fixed unit test failure

* [ACA-4422] Resolved unit test errors
This commit is contained in:
Sushmitha V
2021-05-14 21:02:23 +05:30
committed by GitHub
parent afd3a7c93d
commit 68db27bc91
2 changed files with 14 additions and 2 deletions

View File

@@ -45,6 +45,14 @@ export class AspectListDialogComponent implements OnInit {
this.dialog.backdropClick().subscribe(() => {
this.close();
});
this.dialog.keydownEvents().subscribe(event => {
// Esc
if (event.keyCode === 27) {
event.preventDefault();
event.stopImmediatePropagation();
this.close();
}
});
}
onValueChanged(aspectList: string[]) {