Function to collapse all folders

Hi,
I have the code below that I’m trying to collapse all the folders in the tree view but nothing happens when the function is triggered.

@petersonzeferino This seems to be in a vscode extension, right?

If so, does this work as expected in vscode? If not, you’re probably better off asking in the vscode extension developer space. Please create an issue in the Theia repository if there’s a difference in how the vscode extension works in Theia compared to vscode.

@msujew
Yes this is a vscode extension
The behavior to collapse the treeview works fine but actually Theia doesn’t has a function to change the TreeItemCollapsibleState and attach the new state to the TreeNode

The behavior to collapse the treeview works fine but actually Theia doesn’t has a function to change the TreeItemCollapsibleState and attach the new state to the TreeNode

I don’t follow. Theia is just aiming to implement the vscode API as close to the original as possible. If the code in question doesn’t work in vscode, then it’s an issue with your extension - and we cannot really help you with that. If it does work in vscode, then please create an issue in the Theia repo with steps to reproduce the erroneous behavior.