diff --git a/src/DOMWrap.jsx b/src/DOMWrap.jsx index ec3688c7..6027cf45 100644 --- a/src/DOMWrap.jsx +++ b/src/DOMWrap.jsx @@ -22,8 +22,6 @@ export default class DOMWrap extends React.Component { delete props.tag; delete props.hiddenClassName; delete props.visible; - // Otherwise, the propagated click event will trigger another onClick - props.onClick = null; return ; } } diff --git a/src/SubMenu.jsx b/src/SubMenu.jsx index d91aa416..1e2dbe9c 100644 --- a/src/SubMenu.jsx +++ b/src/SubMenu.jsx @@ -492,13 +492,14 @@ export class SubMenu extends React.Component { } = props; menuAllProps.forEach(key => delete props[key]); // Set onClick to null, to ignore propagated onClick event + delete props.onClick; + return (
  • {isInlineMode && title} {isInlineMode && children} diff --git a/src/SubPopupMenu.js b/src/SubPopupMenu.js index 0fec13ab..2d08f4c4 100644 --- a/src/SubPopupMenu.js +++ b/src/SubPopupMenu.js @@ -328,6 +328,9 @@ export class SubPopupMenu extends React.Component { } const { prefixCls, eventKey, visible } = props; menuAllProps.forEach(key => delete props[key]); + + // Otherwise, the propagated click event will trigger another onClick + delete props.onClick; return ( // ESLint is not smart enough to know that the type of `children` was checked. /* eslint-disable */