You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I placed the TreeView on the second page of the PageView, the first time it entered normal, the second time there were duplicate items, or the expansion status was inconsistent.
The text was updated successfully, but these errors were encountered:
Hi @bughoho, it seems that the TreeView is getting rebuilt when you change the page, which is causing the inconsistent behaviour. Try these steps to solve this issue:
Move the Tree state to the parent widget, so that the Tree instance does not change on page switching
Assign a PageStorageKey(refer to this medium article) to maintain the state of the PageView.
Assign a key to the TreeView to maintain its state, avoid rebuilds.
2024-08-29.03.11.38.mov
I placed the TreeView on the second page of the PageView, the first time it entered normal, the second time there were duplicate items, or the expansion status was inconsistent.
The text was updated successfully, but these errors were encountered: