mlaursen / react-md

React material design - An accessible React component library built from the Material Design guidelines in Sass
https://react-md.dev
MIT License
2.34k stars 303 forks source link

How to stop click event propagation on DropdownMenu #1427

Open narayanchoudhary opened 1 year ago

narayanchoudhary commented 1 year ago
// Parent Div
<div onClick={()=> alert('I am clicked')}>

    //Child 
        <DropdownMenu>
             <MenuItem>item 1<MenuItem>
        </DropdownMenu>
</div>

When I click on DropdownMenu the onClick of the parent div also gets called.

How can I stop that?