diff --git a/lib/TabList.js b/lib/TabList.js index f383483..86fe1a2 100644 --- a/lib/TabList.js +++ b/lib/TabList.js @@ -42,7 +42,6 @@ export default class TabList extends React.PureComponent { constructor(props) { super(props) - // When the user presses a Tab, the Decorator data is stored in here and // retrieved when the Tab visually becomes active. // We need to temporarily store it for the controlled component because we @@ -53,7 +52,7 @@ export default class TabList extends React.PureComponent { this.isControlled = props.activeTab != null this.state = { - activeTab: this.isControlled ? props.activeTab : props.tabs[0].key + activeTab: this.isControlled ? props.activeTab : props.tabs[props.defaultTabIndex || 0].key } }