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

Added Controllability to Tabs Component #1232

Merged
merged 2 commits into from
Jul 21, 2015
Merged

Conversation

Zadielerick
Copy link
Contributor

Tabs are now controllable with this PR. Passing a value prop will allow you to programmatically choose which Tab is active or if no Tab is selected at all. If no value prop is passed, Tabs work normally as they have worked before this PR.

Breaking Changes: onChange(tabIndex, tab) now receives onChange(e, tab)

Fix: You can access the tabIndex of the tab by simply writing tabIndex = tab.props.tabIndex;

hai-cea added a commit that referenced this pull request Jul 21, 2015
Added Controllability to Tabs Component
@hai-cea hai-cea merged commit af34e49 into mui:v0.11 Jul 21, 2015
@hai-cea
Copy link
Member

hai-cea commented Jul 21, 2015

Nice!

@oliviertassinari
Copy link
Member

I like the new onActive event.

@hai-cea hai-cea mentioned this pull request Aug 13, 2015
@basarat
Copy link

basarat commented Aug 24, 2015

Waiting for 0.11 on npm for this :)

@zannager zannager added the component: tabs This is the name of the generic UI component, not the React module! label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabs This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants