diff --git a/src/js/tabs/tabs.jsx b/src/js/tabs/tabs.jsx index 92417549dd4bcc..b5448d26554b3a 100644 --- a/src/js/tabs/tabs.jsx +++ b/src/js/tabs/tabs.jsx @@ -10,8 +10,12 @@ var Tabs = React.createClass({ }, getInitialState: function(){ + var selectedIndex = 0; + if (this.props.initialSelectedIndex && this.props.initialSelectedIndex < this.props.children.length) { + selectedIndex = this.props.initialSelectedIndex; + } return { - selectedIndex: 0 + selectedIndex: selectedIndex }; },