Issue
I am writing an extension for Visual Studio Code, and I create a new activityBar with some treeViews that display some data from a JSON file. I would like to have the possibility to multi-select some of the items displayed like we can multi-select files in the Explorer. Any ideas? Thank you in advance.
Solution
To enable the multi-select feature you need to set the canSelectMany property to true.
const provider = new ModulesProvider(`${rootPath}`);
vscode.window.createTreeView('nodeDependencies', {
treeDataProvider: provider,
canSelectMany: true
});
To specify additional parameters while creating the TreeView we need to use the createTreeView method instead of registerTreeDataProvider.
Answered By - Harshal Limaye
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.