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

Can't suppress click events when clicking on tabs. #97

Closed
PAK90 opened this issue May 3, 2016 · 1 comment
Closed

Can't suppress click events when clicking on tabs. #97

PAK90 opened this issue May 3, 2016 · 1 comment

Comments

@PAK90
Copy link

PAK90 commented May 3, 2016

The tabs I'm using are in a div which has an onClick event, which triggers whenever I click on a tab (since it's in the div). I want to suppress this, and have been using the code onClick={(evt) => this.suppressClick(evt)} to accomplish this elsewhere. However, it doesn't work (as in, it won't enter the suppressClick function at all) in the tab code, no matter where I put it; I've tried to put it as a property in the <TabList> and <Tab> tags to no avail. I know it works in <div>s so I put one around the <tab> tags but that disabled clicking on the tabs entirely. What's the recommended method to disable click event propagation for these tabs?

@danez
Copy link
Collaborator

danez commented Jun 16, 2017

Since you posted a lot of things have changed. Sorry that no one responded.

I think with the latest version supplying onClick on the tab and tablist should work.
Otherwise it is now also possible to put a <div> around the <TabList> component and put the onClick there.

@danez danez closed this as completed Jun 16, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants