From 9b66cc558868c13ff45eb788a1a2e1088d1548ff Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Sat, 3 Jun 2017 16:37:38 +0300 Subject: [PATCH] =?UTF-8?q?MCSM:Tabs:=20callback=20=D1=84=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B8=20=D0=B2=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D1=8F=D1=8E=D1=82=D1=81=D1=8F=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mcserver-manager/src/main/resources/components.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); + } } });