Restrict Context Menu to Solution Node Only in Solution Explorer #16137
Unanswered
sumit140792
asked this question in
General
Replies: 1 comment
-
Hey @sumit140792, to accomplish this, you can likely override this method of the tree view widget: theia/packages/core/src/browser/tree/tree-widget.tsx Lines 1433 to 1455 in cbceb25 More specifically, you need to extend the theia/packages/navigator/src/browser/navigator-frontend-module.ts Lines 57 to 59 in cbceb25 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
In Solution Explorer, the context menu currently appears when right-clicking on the Solution node, project folders, and files.
However, I want the context menu to show only when right-clicking on the Solution node, and not when right-clicking on any file or folder.
Expected Behavior:
The context menu should appear only on the Solution node in Solution Explorer.
Actual Behavior:
The context menu is currently also appearing on project folders and files, which is not desired in my use case.
NOTE: this is our own custom menus
Steps to Reproduce:
Open a solution in Solution Explorer.
Right-click on the Solution node — context menu appears ✅ (expected).
Right-click on any file or project folder — context menu appears ❌ (not expected).
Goal:
Looking to disable or prevent the context menu from showing on files and folders, and allow it only on the Solution node.
Beta Was this translation helpful? Give feedback.
All reactions