-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
[Extension Authoring] TreeDataProvider update doesn't cause update of collapsibleState of TreeItems #54192
Comments
(Experimental duplicate detection) |
Duplicate of #30918 |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
@sandy081, are you sure this is the same issue? |
I'm also having this problem. I want to add a collapse/expand button to the navigation bar, but the only ways that I've found for actually collapsing/expanding the tree are:
The obvious solution would be just setting |
This is another issue related to @joaomoreno FYI |
If you want a node to be expanded or collapsed programatically, may be the right approach is to have an API to expand or collapse instead of causing a data change? |
@sandy081 Why not both an API and listening for a mutation of the |
CollapsibleState is view state property and not data property. IMO it was wrongly placed and a method in the TreeView is the right place. Also, we do not want to provide same functionality as multiple APIs. |
It used to work with |
@sandy081 Now I see. So are there any plans about adding such a functionality? It would be really useful for an extension authoring. |
There are plans to add an API to expand/collapse - #55879 |
For example, try to implement toggle-expansion-on-select behavior to mimic the built-in explorer. Can track the real state using As mentioned earlier in this bug, updating an existing TreeItem's Current stable (1.31) and insiders (1.32). Thanks! |
duplicate of #78970 |
Steps to Reproduce:
TreeDataProvider
TreeItemCollapsibleState.Collapsed
TreeItem there and save a ref to itTreeDataProvider#onDidChangeTreeData
Note:
as expected now there is a collapsedTreeItem
in theTreeDataProvider
TreeItem
to theTreeItemCollapsibleState.Expanded
via the stored refTreeDataProvider#onDidChangeTreeData
Expected result:
There is an expandedTreeItem
in theTreeDataProvider
Actual result:
There is a collapsedTreeItem
in theTreeDataProvider
Note 1:
It worked correctly in VSCode 1.24.0 but not in 1.25.0 for meNote 2:
changing collapsibleState in the UI still works.Note 3:
changing collapsibleState from TreeItemCollapsibleState.Expanded/Collapsed to TreeItemCollapsibleState.None works fine.The text was updated successfully, but these errors were encountered: