@@ -6,7 +6,7 @@ import { useNodeId } from './useNodeId'
66import { useVueFlow } from './useVueFlow'
77
88export interface UseNodeConnectionsParams {
9- type ?: MaybeRefOrGetter < HandleType >
9+ handleType ?: MaybeRefOrGetter < HandleType >
1010 handleId ?: MaybeRefOrGetter < string | null >
1111 nodeId ?: MaybeRefOrGetter < string | null >
1212 onConnect ?: ( connections : NodeConnection [ ] ) => void
@@ -18,7 +18,7 @@ export interface UseNodeConnectionsParams {
1818 *
1919 * @public
2020 * @param params
21- * @param params.type - handle type `source` or `target`
21+ * @param params.handleType - handle type `source` or `target`
2222 * @param params.nodeId - node id - if not provided, the node id from the `useNodeId` (meaning, the context-based injection) is used
2323 * @param params.handleId - the handle id (this is required if the node has multiple handles of the same type)
2424 * @param params.onConnect - gets called when a connection is created
@@ -27,7 +27,7 @@ export interface UseNodeConnectionsParams {
2727 * @returns An array of connections
2828 */
2929export function useNodeConnections ( params : UseNodeConnectionsParams = { } ) {
30- const { type , handleId, nodeId, onConnect, onDisconnect } = params
30+ const { handleType , handleId, nodeId, onConnect, onDisconnect } = params
3131
3232 const { connectionLookup } = useVueFlow ( )
3333
@@ -39,10 +39,12 @@ export function useNodeConnections(params: UseNodeConnectionsParams = {}) {
3939
4040 const lookupKey = computed ( ( ) => {
4141 const currNodeId = toValue ( nodeId ) ?? _nodeId
42- const handleType = toValue ( type )
42+ const currentHandleType = toValue ( handleType )
4343 const currHandleId = toValue ( handleId )
4444
45- return `${ currNodeId } ${ handleType ? ( currHandleId ? `-${ handleType } -${ currHandleId } ` : `-${ handleType } ` ) : '' } `
45+ return `${ currNodeId } ${
46+ currentHandleType ? ( currHandleId ? `-${ currentHandleType } -${ currHandleId } ` : `-${ currentHandleType } ` ) : ''
47+ } `
4648 } )
4749
4850 watch (
0 commit comments