From 55439e455e81b7e900b21d4926495ac4abb58ac9 Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Thu, 13 Jun 2024 21:17:57 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B:=20fix=20workflow=20tags=20ini?= =?UTF-8?q?tialization=20in=20`Workflow/Editor/Index`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Workflow/Editor/Index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index ffb07080dc1f..66bd47b66e27 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -354,7 +354,7 @@ export default { } } - const tags = ref([]); + const tags = ref(props.workflowTags); const setTagsHandler = new SetValueActionHandler( undoRedoStore, (value) => (tags.value = structuredClone(value)), From d3d06d4e87a7d63291820e0ca59a2d712cd16b4d Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Fri, 14 Jun 2024 11:44:34 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F:=20spread=20`props.wo?= =?UTF-8?q?rkflowTags`=20in=20`Workflow/Editor/Index`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marius van den Beek --- client/src/components/Workflow/Editor/Index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index 66bd47b66e27..1b582dd77f6a 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -354,7 +354,7 @@ export default { } } - const tags = ref(props.workflowTags); + const tags = ref([...props.workflowTags]); const setTagsHandler = new SetValueActionHandler( undoRedoStore, (value) => (tags.value = structuredClone(value)), From 325091bb5335c433e8a7776e39c56ddfd17d3f0f Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Tue, 18 Jun 2024 16:47:45 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F:=20initiate=20`tags`?= =?UTF-8?q?=20ref=20using=20immediate=20watch=20for=20`props.workflowTags`?= =?UTF-8?q?=20in=20`Workflow/Editor/Index`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Workflow/Editor/Index.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index 1b582dd77f6a..84904cecc855 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -184,7 +184,7 @@ import { useMagicKeys, whenever } from "@vueuse/core"; import { logicAnd, logicNot, logicOr } from "@vueuse/math"; import { Toast } from "composables/toast"; import { storeToRefs } from "pinia"; -import Vue, { computed, nextTick, onUnmounted, ref, unref } from "vue"; +import Vue, { computed, nextTick, onUnmounted, ref, unref, watch } from "vue"; import { getUntypedWorkflowParameters } from "@/components/Workflow/Editor/modules/parameters"; import { ConfirmDialog } from "@/composables/confirmDialog"; @@ -354,7 +354,16 @@ export default { } } - const tags = ref([...props.workflowTags]); + const tags = ref([]); + + watch( + () => props.workflowTags, + (newTags) => { + tags.value = [...newTags]; + }, + { immediate: true } + ); + const setTagsHandler = new SetValueActionHandler( undoRedoStore, (value) => (tags.value = structuredClone(value)),