-
Notifications
You must be signed in to change notification settings - Fork 29
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
expandAllChildren causes duplicate tree nodes #15
Comments
hi @christianrowlands, thanks for the appreciation and your feedback. |
Same issue with expand as well, And please add example for best practice to get tree controller. |
Yeah, that is another issue I am running into. I can get the controller, but it is not initialized until after the |
@christianrowlands I didn't such a use case in mind when I designed the controller, and with the current implementation I don't see any way of getting to know when the controller will get initialized, so the a delayed seems like the best option. What I can do, is to add a Will this work for you @christianrowlands ? |
@berslen I will look into the |
Yeah, an Or maybe there is an even more straightforward approach for my specific use case. I am looking to mimic Reddit's behavior for comments on a post where all of the comments and child comments are expanded by default. Given the new
|
@christianrowlands you can already use the
|
the fix for You can use the updated code from this branch, it is working but not properly tested yet. The branch will be merged into |
Good evening!
Thank you for creating this project. It has been awesome to use!
I have run into a bug using the new
expandAllChildren
feature released in version 2.0.0. When calling that method on theTreeViewController
, it creates duplicates of all the items in the tree. I was able to reproduce the issue in your example Flutter app.Here is a screenshot of the problem. Notice that there are two instances of
Item 1-0E
. All I did to get into this state is click theExpand all
button exactly once. If you click it a few times then the duplicates are cleared out.The text was updated successfully, but these errors were encountered: