RED-8183: close the box upon pressing esc.

This commit is contained in:
Nicoleta Panaghiu 2024-02-13 11:05:05 +01:00
parent 0fd56e7329
commit 38e3fac70e

View File

@ -101,6 +101,13 @@ export class UserManagementComponent implements OnInit, OnDestroy {
}
}
@HostListener('document:keyup', ['$event'])
handleEsc($event: KeyboardEvent) {
if ($event.key === 'Escape' && this.editingReviewer) {
this.editingReviewer = false;
}
}
#customSort(ids: string[]) {
let sorted = [...ids].sort((a, b) => this.userService.getName(a).localeCompare(this.userService.getName(b)));
sorted = moveElementInArray(sorted, this._currentUserId, 0);