From 557a679e8923aabdf79e21df131f947d37ee7877 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 3 Feb 2024 13:13:30 +0100 Subject: [PATCH] chore(core): cleanup vueflow cmp --- packages/core/src/container/VueFlow/VueFlow.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/core/src/container/VueFlow/VueFlow.vue b/packages/core/src/container/VueFlow/VueFlow.vue index 516b3db9..85d64b33 100644 --- a/packages/core/src/container/VueFlow/VueFlow.vue +++ b/packages/core/src/container/VueFlow/VueFlow.vue @@ -4,9 +4,11 @@ import { onUnmounted, provide } from 'vue' import Viewport from '../Viewport/Viewport.vue' import A11yDescriptions from '../../components/A11y/A11yDescriptions.vue' import type { FlowEmits, FlowProps, FlowSlots, VueFlowStore } from '../../types' -import { useVueFlow, useWatchProps } from '../../composables' -import { useHooks } from '../../store' import { Slots } from '../../context' +import { useOnInitHandler } from '../../composables/useOnInitHandler' +import { useWatchProps } from '../../composables/useWatchProps' +import { useVueFlow } from '../../composables/useVueFlow' +import { useHooks } from '../../store/hooks' const props = withDefaults(defineProps(), { snapToGrid: undefined, @@ -64,6 +66,8 @@ const dispose = useWatchProps({ modelValue, nodes: modelNodes, edges: modelEdges useHooks(emit, hooks) +useOnInitHandler() + // slots will be passed via provide // this is to avoid having to pass them down through all the components // as that would require a lot of boilerplate and causes significant performance drops