File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import '../../assets/index.less';
88export default ( ) => (
99 < div >
1010 < h2 > menu item group</ h2 >
11- < Menu style = { { margin : 20 , width : 300 } } >
11+ < Menu style = { { margin : 20 , width : 300 } } onClick = { ( ) => console . log ( 'click' ) } >
1212 < MenuItemGroup title = "group 1" key = "2" >
1313 < MenuItem key = "21" > 2</ MenuItem >
1414 < MenuItem key = "22" > 3</ MenuItem >
Original file line number Diff line number Diff line change @@ -38,13 +38,12 @@ class MenuItemGroup extends React.Component<MenuItemGroupProps> {
3838 const { title, children } = props ;
3939 menuAllProps . forEach ( ( key ) => delete props [ key ] ) ;
4040
41- // Set onClick to null, to ignore propagated onClick event
42- delete props . onClick ;
4341 delete props . direction ;
4442
4543 return (
4644 < li
4745 { ...( props as any ) }
46+ onClick = { ( e ) => e . stopPropagation ( ) }
4847 className = { `${ className } ${ rootPrefixCls } -item-group` }
4948 >
5049 < div
You can’t perform that action at this time.
0 commit comments