From 45bc5434d1da85e87f6ed14b7931f7e19305e945 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Wed, 9 Jun 2021 14:46:04 -0400 Subject: [PATCH] After adding a workflow spec, select it. After deleting a workflow spec, select the master workflow spec. --- src/app/workflow-spec-list/workflow-spec-list.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.ts b/src/app/workflow-spec-list/workflow-spec-list.component.ts index b324ef9..6fc177e 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.ts @@ -181,7 +181,9 @@ export class WorkflowSpecListComponent implements OnInit { dialogRef.afterClosed().subscribe((data: DeleteWorkflowSpecDialogData) => { if (data && data.confirm && data.workflowSpec) { this._deleteWorkflowSpec(data.workflowSpec); - this.selectedSpec = this.masterStatusSpec; + if (typeof this.masterStatusSpec !== 'undefined') { + this.selectSpec(this.masterStatusSpec); + } } }); } @@ -269,6 +271,7 @@ export class WorkflowSpecListComponent implements OnInit { if (isNew) { this._addWorkflowSpec(newSpec); + this.selectSpec(newSpec); } else { this._updateWorkflowSpec(data.id, newSpec); }