RED-9452: add cancel on esc & confirm on enter on delete dossier state.
This commit is contained in:
parent
489de89e85
commit
16163eb7cd
@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, HostListener, Inject } from '@angular/core';
|
||||
import { DossierState } from '@red/domain';
|
||||
import { MAT_DIALOG_DATA, MatDialogClose, MatDialogRef } from '@angular/material/dialog';
|
||||
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
@ -73,6 +73,16 @@ export class ConfirmDeleteDossierStateDialogComponent {
|
||||
});
|
||||
}
|
||||
|
||||
@HostListener('window:keyup.Escape')
|
||||
onEscape() {
|
||||
this._dialogRef.close();
|
||||
}
|
||||
|
||||
@HostListener('window:keyup.Enter')
|
||||
async onEnter() {
|
||||
await this.save();
|
||||
}
|
||||
|
||||
async save() {
|
||||
this._loadingService.start();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user