Closed yzaroui closed 5 years ago
Alright, I understand the problem - doesn't looks like there's a way to disable propagation without changing the components source code. I'm just wondering if there are some cases where you actually want to have event-propagation. It might be a little blunt to have it always disabled...
Hello, I am also facing the same issue. Does any have has a solution for this?
@Shravan89131 Just wrap it with div and stop propagation on it.
<div onClick={e => e.stopPropagation()}>
<Switch>
</div>
Hello, I am using the switch inside a user component in a list. Clicking on the user component displays the user details.
What should happen: Clicking on the switch (handle included) should toggle an attribute on the user without showing the user details.
What happens instead: Clicking on the switch handle triggers displaying the user details (a callback on the user component).
Even when I add e.stopPropagation in the onChange callback, it still propagates.
This maybe related to issue 21 but the solution provided there did not fix this propagation issue.