diff --git a/lib/Wrapper.js b/lib/Wrapper.js index 75e842a..0c33aff 100644 --- a/lib/Wrapper.js +++ b/lib/Wrapper.js @@ -29,12 +29,14 @@ module.exports = createReactClass({ return { atpManager: this.manager }; }, - componentWillMount: function() { + getInitialState: function() { this.manager = createManager({ onChange: this.props.onChange, activeTabId: this.props.activeTabId, letterNavigation: this.props.letterNavigation, }); + + return null }, componentWillUnmount: function() { @@ -47,7 +49,7 @@ module.exports = createReactClass({ componentDidUpdate: function(prevProps) { var updateActiveTab = (prevProps.activeTabId === this.manager.activeTabId) && (prevProps.activeTabId !== this.props.activeTabId); - + if (updateActiveTab) { this.manager.activateTab(this.props.activeTabId); }