Unverified Commit 325091bb authored by Alireza Heidari's avatar Alireza Heidari
Browse files

🛠️: initiate `tags` ref using immediate watch for `props.workflowTags` in `Workflow/Editor/Index`

parent d3d06d4e
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -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)),