-
Notifications
You must be signed in to change notification settings - Fork 80
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 component reverts to first tab whenever parent component renders #26
Comments
+1 |
1 similar comment
+1 |
@matthewgertner Given that the author has been unresponsive for months, may I ask you to publish your PR as a node module (eg |
+1 |
@pedronauck Making a last effort to get your attention. Any chance you can accept the PR and publish a new NPM package? |
Got confused with who was unresponsive :D |
@matthewgertner I think it's safe to fork and publish a new one. |
Okay I'll get it done this week. |
👍 |
I'm embedding your component in another React component. Every time I emit a
change
event in one of the tabs, the tab component displays the first tab. The problem seems to be thecomponentWillReceiveProps
method. It always sets the state to the "new"tabActive
property even if it is the same as the oldtabActive
property. As a result, if you don't pass in the prop explicitly, it reverts to the default value on every render. Wouldn't it be better to have the following?Or am I misunderstanding something?
The text was updated successfully, but these errors were encountered: