Custom tree view menu items are not refreshed when context is changed #8757
Labels
help wanted
issues meant to be picked up, require help
vscode
issues related to VSCode compatibility
Bug Description:
I have a custom tree view and I am trying to implement a toggle button behavior in its menu.
I added 2 commands to the
view/title
menu of the my view. Each of the commands has awhen
clause that checks a context variable which I set with thesetContext
built-in command. When I click on the button (which triggers the commands) I change the context so that it will show the other command.The expected behavior is that once I set the context, the menu will be refreshed and show the other button. However, it is not refreshed until I move the mouse cursor outside the view and return it again:
This works as expected in VSCode (the menu is refreshed immediately).
Relevant definitions in the
package.json
file:The commands each show a notification and change the context using:
You can see the full implementation here: https://github.com/tal-sapan/treeviewmenurefresh
Steps to Reproduce:
npm install && npm run bundle
Test View
panelAdditional Information
The text was updated successfully, but these errors were encountered: