-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
After a backup and restore, problem to create new handles dynamically. #2078
Comments
Hi, I encounter this same problem last week when upgrading to latest version. My temporary fix was to exclude some keys that I may not need during nodes backup.
|
Hello, sorry for my late reply. I have tried your fix, and it works very well for me, thank you very much. I don't know when a final fix will arrive, but that's fine, I think I can close the issue. |
Hey @remibesset! Thanks for the bug report. |
Hey @moklick I just tested and everything is fine, I will continue to test further.
|
Hello @moklick, |
Hi @stanislav-grin, you can retrieve this information by using the reactFlowInstance : https://reactflow.dev/docs/api/react-flow-instance/ The reactFlowInstance variable has a method where you can get your nodes: You will be able to see a bunch of information and also the |
Hi @remibesset, thank you for your answer! |
My bad, I have two different projects with react-flow which are not at the same version, and you are right we can't access to the But like as you today I made some code and need @moklick Could you make a method which we can get nodes with and without |
Just for information, I've also created a new topic in community discussions (before this discussion started here), with more information on this issue. Sorry for the accidental cross-posting. |
So @stanislav-grin, after some research I find temporary fix which allow you to get back the
For your specific case, I think that could work :
|
Thank you, @remibesset, for your help and suggestion! It works perfectly. |
Sorry guys! We will export the symbol you need for accessing the |
you can now do:
and then use it like:
|
Describe the Bug
My project is to create a custom node, this custom node contains a button that allows new handles to be created.
This works fine, but when the flow is saved and restored, the new handles added to the same custom node are not connectable.
This error message appears until the node is deleted:
couldn't create edge for source handle id: dndnode_1649946748290_call_3_call_1649946788581; edge id: reactflow__edge-dndnode_1649946748290dndnode_1649946788581-dndnode_1649946778292
I already tried with this problem: #1641, but it did not solve my error, maybe I missed something
I noticed that the number of Handle I added and the number of
handleBounds
in the node are different after a restore, so I think this is a potential path to bug resolution. (You can see that on the screenshot)Secondly, if a handle is removed, the edge remains and leads to errors, is it up to me to remove the edge programmatically?
react_flow_issue_handles_save_restore.mp4
0 -> 26 sec : The main issue
26 -> the end : The second question
Your Example Website or App
Here is the codesandbox link to my code, if you want to test it yourself:
https://codesandbox.io/s/react-flow-issue-add-handles-after-restoring-k4uwgg
Steps to Reproduce the Bug or Issue
The bug occurs if you go to the console an error message appears every time you change the node.
If you try to delete or link the two nodes with the handles created before the restore, this works as it should.
Expected behavior
As a user I expected to add new handles to my custom node after a restore but I can't connect the new handles to nodes.
Screenshots or Videos
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: