From 807e7fb76e55308eb81755481ac150a11ad166e9 Mon Sep 17 00:00:00 2001 From: Guillaume Cusnieux Date: Tue, 31 Oct 2023 16:40:48 +0100 Subject: [PATCH] fix: remove confirm state when policy changed or submitted --- src/policy-studio/gv-design/gv-design.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/policy-studio/gv-design/gv-design.js b/src/policy-studio/gv-design/gv-design.js index 0be6d1dd..c7389fa0 100644 --- a/src/policy-studio/gv-design/gv-design.js +++ b/src/policy-studio/gv-design/gv-design.js @@ -331,6 +331,7 @@ export class GvDesign extends KeyboardElement(LitElement) { }); this._initialDefinition = { ...definition, flows, resources, plans }; this._definition = deepClone(this._initialDefinition); + this._currentAskConfirmation = null; this.isDirty = false; this._selectFirstFlow(); } @@ -563,6 +564,7 @@ export class GvDesign extends KeyboardElement(LitElement) { } _onChangeFlowStepState({ detail }) { + this._currentAskConfirmation = null; const targetFlow = this._findFlowById(detail.flowId); const step = targetFlow[detail.flowKey][detail.position]; step.enabled = detail.enabled; @@ -778,6 +780,7 @@ export class GvDesign extends KeyboardElement(LitElement) { } async _onSubmitFlowStep({ detail }) { + this._currentAskConfirmation = null; this._writeFlowStep(detail.values); await this.requestUpdate('_definition'); this.getChildren().forEach((c) => c.requestUpdate());