diff --git a/src/components/Tabs/Tabs.js b/src/components/Tabs/Tabs.js index 60f872c224..cad973775f 100644 --- a/src/components/Tabs/Tabs.js +++ b/src/components/Tabs/Tabs.js @@ -115,9 +115,10 @@ export default class Tabs extends React.Component { return React.Children.map(this.props.children, tab => tab); } - getTabAt = index => { + getTabAt = (index, useFresh) => { return ( - this[`tab${index}`] || React.Children.toArray(this.props.children)[index] + (!useFresh && this[`tab${index}`]) || + React.Children.toArray(this.props.children)[index] ); }; @@ -251,7 +252,7 @@ export default class Tabs extends React.Component { }), }; - const selectedTab = this.getTabAt(this.state.selected); + const selectedTab = this.getTabAt(this.state.selected, true); const selectedLabel = selectedTab ? selectedTab.props.label : ''; return (