@@ -6,7 +6,7 @@ import { useNodeId } from './useNodeId'
6
6
import { useVueFlow } from './useVueFlow'
7
7
8
8
export interface UseNodeConnectionsParams {
9
- type ?: MaybeRefOrGetter < HandleType >
9
+ handleType ?: MaybeRefOrGetter < HandleType >
10
10
handleId ?: MaybeRefOrGetter < string | null >
11
11
nodeId ?: MaybeRefOrGetter < string | null >
12
12
onConnect ?: ( connections : NodeConnection [ ] ) => void
@@ -18,7 +18,7 @@ export interface UseNodeConnectionsParams {
18
18
*
19
19
* @public
20
20
* @param params
21
- * @param params.type - handle type `source` or `target`
21
+ * @param params.handleType - handle type `source` or `target`
22
22
* @param params.nodeId - node id - if not provided, the node id from the `useNodeId` (meaning, the context-based injection) is used
23
23
* @param params.handleId - the handle id (this is required if the node has multiple handles of the same type)
24
24
* @param params.onConnect - gets called when a connection is created
@@ -27,7 +27,7 @@ export interface UseNodeConnectionsParams {
27
27
* @returns An array of connections
28
28
*/
29
29
export function useNodeConnections ( params : UseNodeConnectionsParams = { } ) {
30
- const { type , handleId, nodeId, onConnect, onDisconnect } = params
30
+ const { handleType , handleId, nodeId, onConnect, onDisconnect } = params
31
31
32
32
const { connectionLookup } = useVueFlow ( )
33
33
@@ -39,10 +39,12 @@ export function useNodeConnections(params: UseNodeConnectionsParams = {}) {
39
39
40
40
const lookupKey = computed ( ( ) => {
41
41
const currNodeId = toValue ( nodeId ) ?? _nodeId
42
- const handleType = toValue ( type )
42
+ const currentHandleType = toValue ( handleType )
43
43
const currHandleId = toValue ( handleId )
44
44
45
- return `${ currNodeId } ${ handleType ? ( currHandleId ? `-${ handleType } -${ currHandleId } ` : `-${ handleType } ` ) : '' } `
45
+ return `${ currNodeId } ${
46
+ currentHandleType ? ( currHandleId ? `-${ currentHandleType } -${ currHandleId } ` : `-${ currentHandleType } ` ) : ''
47
+ } `
46
48
} )
47
49
48
50
watch (
0 commit comments