Skip to content

Commit

Permalink
[NIFI-13243] - support cancel response in CloseOnEscapeDialog (apache…
Browse files Browse the repository at this point in the history
…#8838)

This closes apache#8838
  • Loading branch information
rfellows authored May 15, 2024
1 parent eaf3f23 commit c794943
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,8 @@ export class EditConnectionComponent extends CloseOnEscapeDialog {
override isDirty(): boolean {
return this.editConnectionForm.dirty;
}

override getCancelDialogResult(): any {
return 'CANCELLED';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c794943

Please sign in to comment.