fixed discard-changes bug on new dmps

This commit is contained in:
Sofia Papacharalampous 2024-06-06 17:55:50 +03:00
parent 631e4bef8b
commit 8b3f1874cf
1 changed files with 2 additions and 1 deletions

View File

@ -358,7 +358,8 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) {
setTimeout(x => {
this.step = this.step > 0 ? this.step - 1 : 0;
if (this.isNew) this.step = 0;
else this.step = this.step > 0 ? this.step - 1 : 0;
this.ngOnInit();
});
}