From 7d6e1f8cc77c26c5251421496f820cec70e96e5e Mon Sep 17 00:00:00 2001 From: cristinamudura <80831066+cristinamudura@users.noreply.github.com> Date: Wed, 23 Nov 2022 12:45:14 +0100 Subject: [PATCH] Implemented delete of workflow definitions on Delete button click (#3462) --- .../src/modules/workflow-definitions/components/browser.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/designer/elsa-workflows-designer/src/modules/workflow-definitions/components/browser.tsx b/src/designer/elsa-workflows-designer/src/modules/workflow-definitions/components/browser.tsx index 3d5591740..54d11b445 100644 --- a/src/designer/elsa-workflows-designer/src/modules/workflow-definitions/components/browser.tsx +++ b/src/designer/elsa-workflows-designer/src/modules/workflow-definitions/components/browser.tsx @@ -61,7 +61,9 @@ export class WorkflowDefinitionBrowser { this.modalDialogService.show( () => DefaultContents.Warning("Are you sure you want to delete this workflow definition?"), { - actions: [DefaultModalActions.Delete(() => { + actions: [DefaultModalActions.Delete(async () => { + await this.api.delete(workflowDefinition); + await this.loadWorkflowDefinitions(); }), DefaultModalActions.Cancel()], modalType: ModalType.Confirmation });