Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Update default Tab index #114

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/TabList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
}

Expand Down