onConnect method in useHandleConnections still not work after update to version 1.34.1
ljw20180420 opened this issue · 2 comments
ljw20180420 commented
Is there an existing issue for this?
- I have searched the existing issues and this is a new bug.
Current Behavior
onConnect method in useHandleConnections still not work after update to version 1.34.1
Expected Behavior
onConnect method in useHandleConnections should work after update to version 1.34.1
Steps To Reproduce
- git clone https://github.com/ljw20180420/vueFlowBug
- cd vueFlowBug
- npm install
- npm add @vue-flow/core
- npm run dev
- Connect the two nodes. There is no console.log display. So onConnect method of useHandleConnections still does not work.
Relevant log output
No response
Anything else?
No response
bcakmakoglu commented
It works but the existing bug #1393 causes some issues due to auto-generated handle ids.
To solve this set ids on your handles and use the id in useHandleConnections
For example:
<Handle id="left" type="target" :position="Position.Left" />
const conns = useHandleConnections({
type: 'target',
id: 'left',
onConnect(connections) {
console.log('source connected', connections)
},
})
ljw20180420 commented
Thank you.