Unverified Commit 50d5ea57 authored by mvdbeek's avatar mvdbeek
Browse files

Use computed instead of ref in useWorkflowInstance

This fixes reactivity of the composable when the workflow isn't already
in the store, e.g. when looking at the details component loaded after
submitting a workflow.
parent f0ba57d4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
import { useWorkflowStore } from "@/stores/workflowStore";
import { ref } from "vue";
import { computed, ref } from "vue";

export function useWorkflowInstance(workflowId: string) {
    const workflowStore = useWorkflowStore();
    const workflow = ref(workflowStore.getStoredWorkflowByInstanceId(workflowId));
    const workflow = computed(() => workflowStore.getStoredWorkflowByInstanceId(workflowId));
    const loading = ref(false);

    async function getWorkflowInstance() {