-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix a bug with node deletion #132
Conversation
@mihna123 we need to have an issue that explains the defect before we get a PR. Also, we can’t merge code that doesn’t have a unit test. If there is a bug, we’ll need to make sure that the unit test fails when your code is missing and passes once your fix is present. |
Sorry, i will make an issue then |
I faced this issue as well, can you merge it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit tests are required. Within this tests, please make sure that you don’t call setData inside of a recursive function like I mention in #133 (comment)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was closed automatically since it was marked as stale because it has not had recent activity. Thank you for your contributions. |
What does this PR do?
It fixes a bug with node deletion. The bug happens when you send data with some nodes missing (because you deleted them) to TreeView component, and you want to have all nodes expanded with expandedId prop. This small fix just checks if node is still in the tree before trying to collapse it, otherwise the exception "Node with id=x doesn't exist in the tree" will be thrown.