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

Add initialSelectedIndex property to Tabs #389

Merged
merged 4 commits into from
Mar 11, 2015
Merged

Conversation

WRidder
Copy link
Contributor

@WRidder WRidder commented Mar 5, 2015

Fixes #375. Also checks whether the index is not out of bounds w.r.t. the amount of tab children.

Fixes mui#375. Also checks whether the index is not out of bounds w.r.t. the amount of tab children.
@hai-cea
Copy link
Member

hai-cea commented Mar 10, 2015

@WRidder Can you please also add PropType validation as well?

initialSelectedIndex: React.PropTypes.number

Also, please add the prop to the docs here:
https://github.com/callemall/material-ui/blob/master/docs/src/app/components/pages/components/tabs.jsx#L58

Thanks!

@WRidder
Copy link
Contributor Author

WRidder commented Mar 11, 2015

Alright, updated proptype validation. I also added the proptype validation for tabWidth since it was specified in the docs already. Added initialSelectedIndex to the docs as well.

hai-cea pushed a commit that referenced this pull request Mar 11, 2015
Add initialSelectedIndex property to Tabs
@hai-cea hai-cea merged commit 7bfdf6b into mui:master Mar 11, 2015
@hai-cea
Copy link
Member

hai-cea commented Mar 11, 2015

Thanks @WRidder 👍

@ferrannp
Copy link

Uf thanks for this one, very convenient specially for routing when sending a direct link to somebody. Any idea when this will be released?

@mmrtnz
Copy link
Contributor

mmrtnz commented Mar 26, 2015

Hopefully we can get v0.7.2 ironed out by Wednesday at the latest.

@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.

Allow setting initial tab index
5 participants