updated base dialog to not verify the changes on closing the window when it's on edit mode
This commit is contained in:
parent
f480a52cc3
commit
6c82fe505b
@ -28,7 +28,7 @@ export abstract class BaseDialogComponent extends AutoUnsubscribe implements OnI
|
||||
private readonly _dialogService: ConfirmationDialogService = this._injector.get(ConfirmationDialogService);
|
||||
private readonly _dialog: MatDialog = this._injector.get(MatDialog);
|
||||
|
||||
constructor(protected readonly _injector: Injector, protected readonly _dialogRef: MatDialogRef<BaseDialogComponent>) {
|
||||
constructor(protected readonly _injector: Injector, protected readonly _dialogRef: MatDialogRef<BaseDialogComponent>, private readonly _isInEditMode?: boolean) {
|
||||
super();
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ export abstract class BaseDialogComponent extends AutoUnsubscribe implements OnI
|
||||
}
|
||||
|
||||
close(): void {
|
||||
if (this.changed) {
|
||||
if (this._isInEditMode && this.changed) {
|
||||
this._openConfirmDialog().then(result => {
|
||||
if (result in ConfirmOptions) {
|
||||
if (result === ConfirmOptions.CONFIRM) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user