MCPcopy Create free account
hub / github.com/DTStack/molecule / handleTabContextMenu

Function handleTabContextMenu

src/workbench/editor/group.tsx:47–56  ·  view source on GitHub ↗
(e: React.MouseEvent, tabItem)

Source from the content-addressed store, hash-verified

45 const contextView = useContextView();
46
47 const handleTabContextMenu = (e: React.MouseEvent, tabItem) => {
48 const handleOnMenuClick = (e: React.MouseEvent, item) => {
49 onClickContextMenu?.(e, item, tabItem);
50 contextView.hide();
51 };
52
53 contextView?.show(getEventPosition(e), () => (
54 <Menu data={menu} onClick={handleOnMenuClick} />
55 ));
56 };
57
58 useEffect(() => {
59 return function cleanup() {

Callers

nothing calls this directly

Calls 2

getEventPositionFunction · 0.90
showMethod · 0.80

Tested by

no test coverage detected