feat(core,composables): add useNodesData composable
This commit is contained in:
@@ -16,15 +16,16 @@ interface UseHandleConnectionsParams {
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to check if a <Handle /> is connected to another <Handle /> and get the connections.
|
||||
* Composable that returns existing connections of a handle
|
||||
*
|
||||
* @public
|
||||
* @param param.type - handle type 'source' or 'target'
|
||||
* @param param.nodeId - node id - if not provided, the node id from the NodeIdContext is used
|
||||
* @param param.id - the handle id (this is only needed if the node has multiple handles of the same type)
|
||||
* @param param.onConnect - gets called when a connection is established
|
||||
* @param param.onDisconnect - gets called when a connection is removed
|
||||
* @returns an array with connections
|
||||
* @param UseHandleConnectionsParams
|
||||
* @param UseHandleConnectionsParams.type - handle type `source` or `target`
|
||||
* @param UseHandleConnectionsParams.nodeId - node id - if not provided, the node id from the `useNodeId` (meaning, the context-based injection) is used
|
||||
* @param UseHandleConnectionsParams.id - the handle id (this is required if the node has multiple handles of the same type)
|
||||
* @param UseHandleConnectionsParams.onConnect - gets called when a connection is created
|
||||
* @param UseHandleConnectionsParams.onDisconnect - gets called when a connection is removed
|
||||
* @returns An array of connections
|
||||
*/
|
||||
export function useHandleConnections({
|
||||
type,
|
||||
|
||||
Reference in New Issue
Block a user