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

Add Item is being called twice for when reading nodes/ edges from redux and local storage #8

Open
KevinZhou1 opened this issue May 8, 2019 · 1 comment

Comments

@KevinZhou1
Copy link

<Graph graph={{ nodes: this.props.lineageReducer.nodesDisplayed, edges: this.props.lineageReducer.edges, }} options={this.options} events={{ select: (e) => this.expandNode(e), }} />

We read our nodes and edges from redux reducer like so. I have implemented a function that reads data from local storage and sets nodes and edges correctly, I've went into redux and verified it is valid. However, when running my code, an error appears saying that we are adding nodes edges with duplicate id. I debugged through the code and came to the conclusion the in the vis index.js, addNode and addEdge functions are being called twice. I attemted to modify the library code to make a check to prevent it calling again but now icons don't render their image defined by their group correctly. Is someone able to help with this?

@anishmprasad
Copy link
Owner

sure,
please elaborate in more details and share sample snippets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants