mirror of
https://github.com/apache/nifi.git
synced 2025-03-03 07:59:15 +00:00
[NIFI-13243] - support cancel response in CloseOnEscapeDialog (#8838)
This closes #8838
This commit is contained in:
parent
eaf3f23100
commit
c794943c5b
@ -431,4 +431,8 @@ export class EditConnectionComponent extends CloseOnEscapeDialog {
|
||||
override isDirty(): boolean {
|
||||
return this.editConnectionForm.dirty;
|
||||
}
|
||||
|
||||
override getCancelDialogResult(): any {
|
||||
return 'CANCELLED';
|
||||
}
|
||||
}
|
||||
|
@ -39,11 +39,19 @@ export abstract class CloseOnEscapeDialog {
|
||||
takeUntilDestroyed()
|
||||
)
|
||||
.subscribe(() => {
|
||||
this.dialogRef.close();
|
||||
if (this.getCancelDialogResult()) {
|
||||
this.dialogRef.close(this.getCancelDialogResult());
|
||||
} else {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getCancelDialogResult(): any | null | undefined {
|
||||
return null;
|
||||
}
|
||||
|
||||
isDirty(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user