From 47432a8238e0726fe1eb0cc7c6c714fe70759427 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 12 Dec 2022 10:46:00 +0100 Subject: [PATCH] fix(core): use connectable prop or global connectable in Handle Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --- packages/core/src/components/Handle/Handle.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/components/Handle/Handle.vue b/packages/core/src/components/Handle/Handle.vue index 4a235d59..b57c20cf 100644 --- a/packages/core/src/components/Handle/Handle.vue +++ b/packages/core/src/components/Handle/Handle.vue @@ -3,7 +3,7 @@ import { isFunction, isString } from '@vueuse/core' import type { Position } from '../../types' import type { HandleProps } from '../../types/handle' -const { position = 'top' as Position, connectable, id, isValidConnection, ...props } = defineProps() +const { position = 'top' as Position, connectable = true, id, isValidConnection, ...props } = defineProps() const type = toRef(props, 'type', 'source') @@ -35,7 +35,7 @@ const isConnectable = computed(() => { return connectable(node, connectedEdges.value) } - return connectable || true + return isDef(connectable) ? connectable : nodesConnectable }) onMounted(() => {