fix useNodeConnections callback not firing if connections.current not used

This commit is contained in:
peterkogo
2025-06-12 15:50:14 +02:00
parent 74599bb8dc
commit 5e33ac3e8b
2 changed files with 36 additions and 5 deletions
@@ -16,6 +16,15 @@
handleType: 'target'
});
useNodeConnections({
onConnect: (connection) => {
console.log('Connection made:', connection);
},
onDisconnect: (connection) => {
console.log('Connection disconnected:', connection);
}
});
let nodeData = $derived(
useNodesData<MyNode>(connections.current.map((connection) => connection.source))
);