Skip to content

Add initialSelectedIndex property to Tabs#389

Merged
hai-cea merged 4 commits into
mui:masterfrom
WRidder:patch-2
Mar 11, 2015
Merged

Add initialSelectedIndex property to Tabs#389
hai-cea merged 4 commits into
mui:masterfrom
WRidder:patch-2

Conversation

@WRidder
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 added 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
Copy Markdown
Member

hai-cea commented Mar 11, 2015

Thanks @WRidder 👍

@ferrannp
Copy link
Copy Markdown

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
Copy Markdown
Contributor

mmrtnz commented Mar 26, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tabs Changes related to the tabs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow setting initial tab index

5 participants