fix: valid connection func in handle

This commit is contained in:
Braks
2021-10-21 15:10:42 +02:00
parent 0a9c1b0717
commit e11fddf70a
+1 -2
View File
@@ -16,7 +16,6 @@ const props = withDefaults(defineProps<HandleProps>(), {
type: 'source',
position: Position.Top,
connectable: true,
isValidConnection: () => true,
})
const store = useStore()
@@ -25,7 +24,7 @@ const nodeId = inject(NodeIdContextKey)!
const handler = useHandle()
const onMouseDownHandler = (event: MouseEvent) =>
handler(event, props.id, nodeId, props.type === 'target', props.isValidConnection)
handler(event, props.id, nodeId, props.type === 'target', props.isValidConnection ?? (() => true))
</script>
<template>
<div