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

Function handleRightClick

src/workbench/sidebar/explore/folderTree.tsx:129–143  ·  view source on GitHub ↗
(event, data)

Source from the content-addressed store, hash-verified

127 };
128
129 const handleRightClick: ITreeProps['onRightClick'] = (event, data) => {
130 if ((event.target as HTMLElement).nodeName !== 'INPUT') {
131 event.preventDefault();
132 const menuItems = onRightClick?.(data) || [];
133
134 menuItems.length &&
135 contextView?.show(getEventPosition(event), () => (
136 <Menu
137 role="menu"
138 onClick={(_, item) => handleMenuClick(item!, data)}
139 data={menuItems}
140 />
141 ));
142 }
143 };
144
145 const handleUpdateFile = (
146 e: HTMLInputElement,

Callers

nothing calls this directly

Calls 3

getEventPositionFunction · 0.90
handleMenuClickFunction · 0.85
showMethod · 0.80

Tested by

no test coverage detected