Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG]: edge.sourceNode is not updated by updateEdge when edge.source is updated #1704

Closed
1 task done
Tracked by #1705
ljw20180420 opened this issue Dec 3, 2024 · 2 comments · Fixed by #1700
Closed
1 task done
Tracked by #1705
Assignees
Labels
bug Something isn't working

Comments

@ljw20180420
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and this is a new bug.

Current Behavior

I use Events API.

const { onEdgeUpdate, updateEdge } = useVueFlow();
onEdgeUpdate((params) => {
  updateEdge(params.edge, params.connection)
})

However, updateEdge only updates edge.source but not edge.sourceNode.

Expected Behavior

Both edge.source but not edge.sourceNode should be updated.

Steps To Reproduce

git clone [email protected]:ljw20180420/vueFlowBug.git
cd vueFlowBug
npm install
npm run dev

In the browser,

Neglect the breakpoint at start up.
Move the source of the edge from `node 1` to `node3`.
In the console, `edge.source` becomes `node 3`, while `edge.sourceNode.id` is still `node 1`.

Relevant log output

No response

Anything else?

No response

@ljw20180420 ljw20180420 added bug Something isn't working triage Awaiting triage labels Dec 3, 2024
@bcakmakoglu
Copy link
Owner

Thanks for the report, will be fixed in the next patch.

@bcakmakoglu bcakmakoglu removed the triage Awaiting triage label Dec 3, 2024
@bcakmakoglu bcakmakoglu linked a pull request Dec 3, 2024 that will close this issue
@bcakmakoglu
Copy link
Owner

Fixed with 1.41.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants