-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
tab resets to first tab onclick event #63
Comments
I had the same issue, I found that I had: The problem was the selectedIndex={0} I hope this will solve your issue. |
Thanks @peterpunk |
Hey, i got this problem, selectedIndex={this.state.selectedTab} also initialise selectedTab state to your preferred tab. then on onSelect={this._handleSelect} event of Tabs, set the selectedTab again. _handleSelect = (index, last) => { by doing this, on tab it will not move to another tab by click event :) |
fyi, what you want is "Controlled Component" behavior -- see https://facebook.github.io/react/docs/forms.html#controlled-components I have an outstanding PR to implement this, #80 |
works for me, thank you @peterpunk |
Hi. I have an onclick event fire from one of my tabs, but on fire, it somehow reset the tab index to go back to the first tab. Say i have 2 tabs, and i'm on the second page of the tab 2, which has Griddle table, when i click on something in one of the griddle's table column ( i have an onclick on an item there ) it triggers the react tab to go back to the first tab vs staying put. I need it to stay put on tab 2 vs somehow route back to tab 1. Any ideas?
The text was updated successfully, but these errors were encountered: