Skip to content

Commit 2a0b2ea

Browse files
authored
Hide context menu after sandwich action (#6098)
Added calls to hideMenu() after setting the sandwich function name, ensuring the context menu closes immediately when the sandwich action is triggered.
1 parent f01315d commit 2a0b2ea

File tree

1 file changed

+2
-0
lines changed
  • ui/packages/shared/profile/src/ProfileFlameGraph/FlameGraphArrow

1 file changed

+2
-0
lines changed

ui/packages/shared/profile/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,13 @@ const ContextMenu = ({
194194

195195
if (dashboardItems.includes('sandwich')) {
196196
setSandwichFunctionName(functionName);
197+
hideMenu();
197198
return;
198199
}
199200

200201
setSandwichFunctionName(functionName);
201202
setDashboardItems([...dashboardItems, 'sandwich']);
203+
hideMenu();
202204
}}
203205
disabled={functionName === '' || functionName == null}
204206
>

0 commit comments

Comments
 (0)