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

Nodes can only be toggled once #54

Open
d07RiV opened this issue May 13, 2018 · 0 comments
Open

Nodes can only be toggled once #54

d07RiV opened this issue May 13, 2018 · 0 comments

Comments

@d07RiV
Copy link

d07RiV commented May 13, 2018

If I click to expand a node, I can't collapse it anymore.

Debugging indicates that the problem lies with the use of context in TreeView/ConnectedTreeComponent. On every componentWillReceiveProps call, the TreeView creates a new store state, which results in all children having different copies of store in their contexts (because context is only read once, during component creation). The store itself should probably be mutable, immutability should only apply to storeState. Or it can be passed via props instead of context.

The problem is easily recreated by periodically updating the parent component, and can be temporarily solved by wrapping the inspector in a PureComponent.

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

1 participant