Skip to content

Commit

Permalink
🛠️: initiate tags ref using immediate watch for `props.workflowTags…
Browse files Browse the repository at this point in the history
…` in `Workflow/Editor/Index`
  • Loading branch information
itisAliRH committed Jun 18, 2024
1 parent d3d06d4 commit 325091b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions client/src/components/Workflow/Editor/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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)),
Expand Down

0 comments on commit 325091b

Please sign in to comment.