Open biskit opened 1 year ago
@biskit did you solve this? I have exactly this problem. when a graph is updated, I'm not sure how to add events to only the new nodes.
is there a way to clear all events?
I also tried cy.one( .. )
to try and just add once, but then none of the events work after a data update.
not sure if this is a bug in the react wrapper library or there is some workaround. either way it makes it very hard to have a graph with updating data :(
I might have to go back to raw cytoscape JS library and just force it to work with react myself.
ok this seems to work:
cy.removeAllListeners()
cy.on("mousedown", "node", tapStart)
i have code that gets data and refreshes this component
after every refresh the number of events per node increases by 1
who should handle the
componentDidUpdate
case here?