From 8dccaf819dca074dd971dffb271bf5e14f0d2745 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 4 Dec 2024 11:22:00 +0100 Subject: [PATCH] Do not show contextMenu on refs --- code/core/src/manager/components/sidebar/Tree.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/core/src/manager/components/sidebar/Tree.tsx b/code/core/src/manager/components/sidebar/Tree.tsx index 0a22df1cb420..d08ab8ffc4d7 100644 --- a/code/core/src/manager/components/sidebar/Tree.tsx +++ b/code/core/src/manager/components/sidebar/Tree.tsx @@ -273,7 +273,10 @@ const Node = React.memo(function Node({ ]); const id = createId(item.id, refId); - const contextMenu = useContextMenu(item, statusLinks, api); + const contextMenu = + refId === 'storybook_internal' + ? useContextMenu(item, statusLinks, api) + : { node: null, onMouseEnter: () => {} }; if (item.type === 'story' || item.type === 'docs') { const LeafNode = item.type === 'docs' ? DocumentNode : StoryNode;