How to fire a data change event for TreeDataProvider in javascript
0
I created an vscode plugin in javascript who is using TreeDataProvider class for rendering tree view. I wonder how to fire an event change to re-render the whole tree. I have read some demo code about tree view and all of them have below code: public readonly onDidChangeTreeDataEmitter: vscode.EventEmitter<TreeItem | null> = new vscode.EventEmitter<TreeItem | null>(); public readonly onDidChangeTreeData: vscode.Event<TreeItem | null> = this.onDidChangeTreeDataEmitter.event; And it calls this.onDidChangeTreeDataEmitter.fire(void 0); to trigger the tree to re-render. How can I implement this event in javascript ? Is there a demo for that?
visual-studio-code vscode-extensions
...