plotly / react-cytoscapejs

React component for Cytoscape.js network visualisations
MIT License
483 stars 68 forks source link

Edges are not dynamically updated. #42

Open sean-thomas-100 opened 5 years ago

sean-thomas-100 commented 5 years ago

When I make changes to elements variable, nodes are newly being created well but not edges. I logged out the result but edges exist with exact source and target. What is the issue occurring this?

gouthampro3 commented 4 years ago

@sean-thomas-100 Please clarify whether or not the ID you are giving when trying to add edge is unique.

chairmanwow commented 4 years ago

I observed this behavior as well. This behavior went away when I assigned ids to my edges.

Haven't gone through the source to figure out why the diff algorithm didn't pick this up. Furthermore, I was using immutable.js. Not sure if that is part of your library mix as well.

SamLebarbare commented 4 years ago

i added a pull request for updating minimal exemple of the readme with identified egde data

https://github.com/plotly/react-cytoscapejs/pull/49

agonzalezjr commented 4 years ago

I can see the same issue even when I have unique ids for my edges.

Not using immutable.js over here.

    "@types/react-cytoscapejs": "1.1.1",
    "cytoscape": "3.16.1",
    "cytoscape-cose-bilkent": "4.1.0",
    "react": "^16.12.0",
    "react-cytoscapejs": "1.2.1",

But it seems to only be happening when the new edge is from a leaf to a new node added as part of the same update.