delete dossier on enter
This commit is contained in:
parent
e75e9dee85
commit
599e547b03
@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, HostListener, Inject } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@ -52,6 +52,13 @@ export class ConfirmationDialogComponent {
|
||||
this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`;
|
||||
}
|
||||
|
||||
@HostListener('window:keyup.enter')
|
||||
onKeyupEnter() {
|
||||
if (this.config.requireInput && !this.confirmationDoesNotMatch()) {
|
||||
this.confirm();
|
||||
}
|
||||
}
|
||||
|
||||
get isDeleteAction() {
|
||||
return this.config?.titleColor === TitleColors.PRIMARY;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user