Skip to content

Commit

Permalink
fix: prevent menu event propagation to treeNode (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortalYoung committed Nov 18, 2022
1 parent b090a7e commit 149cb66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/contextMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export default function ContextMenu({
const menu = (
<Menu
className="dt-contextMenu-menu"
onClick={(item) => data.find((i) => i.key === item.key)?.cb?.()}
onClick={(item) => {
item.domEvent.stopPropagation();
data.find((i) => i.key === item.key)?.cb?.();
}}
>
{data.map((item) =>
item.confirm ? (
Expand Down

0 comments on commit 149cb66

Please sign in to comment.