Skip to content

Commit

Permalink
use store to determine mapped over state
Browse files Browse the repository at this point in the history
Co-authored-by: mvdbeek <m.vandenbeek@gmail.com>
  • Loading branch information
ElectronicBlueberry committed Mar 9, 2023
1 parent 91fdd7b commit e7c56eb
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -2,14 +2,16 @@ import type { DatatypesMapperModel } from "@/components/Datatypes/model";
import { terminalFactory } from "@/components/Workflow/Editor/modules/terminals";
import type { Step, TerminalSource } from "@/stores/workflowStepStore";
import { ref, watch, type Ref, computed } from "vue";
import { useWorkflowStepStore } from "@/stores/workflowStepStore";

export function useTerminal(
stepId: Ref<Step["id"]>,
terminalSource: Ref<TerminalSource>,
datatypesMapper: Ref<DatatypesMapperModel>
) {
const terminal: Ref<ReturnType<typeof terminalFactory> | null> = ref(null);
const isMappedOver = computed(() => terminal.value?.isMappedOver() ?? false);
const stepStore = useWorkflowStepStore();
const isMappedOver = computed(() => stepStore.stepMapOver[stepId.value]?.isCollection ?? false);

watch(
[stepId, terminalSource, datatypesMapper],
Expand Down

0 comments on commit e7c56eb

Please sign in to comment.