diff --git a/mcserver-manager/src/main/resources/components.js b/mcserver-manager/src/main/resources/components.js index 4c721b7..dc94b32 100644 --- a/mcserver-manager/src/main/resources/components.js +++ b/mcserver-manager/src/main/resources/components.js @@ -59,14 +59,15 @@ var Tabs = React.createClass({ return ce('div', (i !== _this.state.activeTab ? {style: {display: 'none'}} : null), child); }); - if (this.props.stateCallback !== null) { - this.props.stateCallback(this.state.activeTab); - } - return(ce('div', null, ce('ul', {className: 'nav nav-tabs', id: 'tabs'}, tabsElm), showElement )) + }, + componentDidUpdate: function() { + if (this.props.stateCallback !== null) { + this.props.stateCallback(this.state.activeTab); + } } });