-
Notifications
You must be signed in to change notification settings - Fork 24
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
Possible bug? #27
Comments
Is this related to this PR-28? |
Not really. The thing here is that when I switch tabs, state get disposed. When re-enter on the tree tab I tried to reuse the Tree object. The root node is okay (gets reset to collapsed, but the remaining nodes that were previously get expanded, now are collapsed but its state say are expanded (you can see the I bypass this bug(?) by creating my own paralel Tree which save the expanded state and the children values. So when I re-enter on the Tree tab, I create a new Tree (your Tree) and re-install the state saved on my tree. |
@busslina can you elaborate on your solution to bypass the bug(?) or post a code sippet |
I just simply have a parallel tree in which I save the state. When I revisit this tab, I recreate the node states based on this parallel tree. Seems that your node implementation is not prepared for a scenario where the page/container gets disposed and rebuilt again. They save the expanded state. But when they get recreated, they are not expanded but still have the expanded state. I could pass my code, but it is just a patch. I recommend you to review your code and when the tree is re/build check the nodes and expand them if they are marked as exoanded |
hi please send the patch, i am new to flutter and using the control in my app |
https://gist.github.com/busslina/e60a41ceca418151c491a730f12a57b0 If you want help to understand my code, ask me in the Gist |
tree-error.webm
The text was updated successfully, but these errors were encountered: