-
Notifications
You must be signed in to change notification settings - Fork 33
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
How can I prevent tab selection? #57
Comments
Hi,
So your callback with I think we have 3 ideas to resolve your request. Idea1: re-set selected tab after
Idea 2: Create your own Idea 3: Add |
Thanks so much for the quick and detailed answer! EDIT: from what I see the onStart event is being fired when clicking on a tab... Thanks again, |
Hi,
I've been using your library and loving it! One thing I can't seem to do:
I want to add a condition that prevents the user from switching tabs. I tried overriding the
onTabSelect
prop to use my own function to handle tab selection, but it seems that even though my method is called, the tab selection happens anyway.Another thing I thought i'd try is
event.preventDefault()
on the event parameter to prevent the tab from being selected, but when I try that I get the error:Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the method
preventDefaulton a released/nullified synthetic event. This is a no-op function. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.
I tried using
event.persist()
as suggested but that didn't work as well.Any idea on how I can accomplish preventing tab selection with a condition?
P.S. I'm using React 15
Thanks!
Uri
The text was updated successfully, but these errors were encountered: