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

Tab: data.activeIndex is overwritten in onTabChange for controlled Tab #1888

Closed
JamiesWhiteShirt opened this issue Jul 21, 2017 · 2 comments
Closed
Labels

Comments

@JamiesWhiteShirt
Copy link

Steps

Make a controlled Tab with both activeIndex and onTabChange props.
Click an item in the tab menu.
Read the data.activeIndex value in onTabChange.

Expected Result

data.activeIndex should be the index of the tab that was clicked.

Actual Result

data.activeIndex is the value of the activeIndex prop passed to the Tab component.

Version

0.71.1

Testcase

https://codepen.io/anon/pen/QMLydJ

@levithomason
Copy link
Member

Superb report, thanks much. PR up.

@JamiesWhiteShirt
Copy link
Author

Superb handling, thanks for the quick fix.

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

No branches or pull requests

2 participants