reshaped
reshaped copied to clipboard
Preventing default and stopping propogation
Is your feature request related to a problem? Please describe.
I find I'm having to add a lot of e.stopPropagation()
or e.preventDefault()
on Buttons, MenuItems and DropDownMenu's.
Describe the solution you'd like
e.g.
I have an Accordian, with a Dropdown Menu in the header, I handle
onClick
by triggering an action, and the Accordian collapses without a stopPropagation. It also regularly causes modals to trigger close etc.
I'd like MenuItem/Button/Actionable/DropDownItems to call preventDefault before triggering the onClick
event to the consuming component.
Describe alternatives you've considered I'm considering forking components to add this in by default, but I'd rather not have to.