Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Switch> component should propagate event when toggling #181

Open
tniezurawski opened this issue Aug 8, 2023 · 0 comments
Open

<Switch> component should propagate event when toggling #181

tniezurawski opened this issue Aug 8, 2023 · 0 comments

Comments

@tniezurawski
Copy link

tniezurawski commented Aug 8, 2023

Currently, <Switch> doesn't propagate event when toggling. That makes it "hard" for the consumer of this component to stop event propagation if they happen to have a nested interaction.

I think that in general, it's a good practice to push event up as the last argument so a consumer always has access to "click"/"touch"/"key*" events.


A fix is just 3 lines of code. I'll prepare a PR when I have a bit of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant