@@ -163,28 +163,16 @@ const _apiProps = {
163163 } ,
164164} ;
165165Helper . setNoneEnumProps ( _apiProps , {
166- // getInitialState: function () {
167- // if (!this._initialState) {
168- // const { selectedTabID, tabs, defaultPanelComponent } = this.optionsManager.options, openTabIDs = [];
169- // tabs.map(tab => {
170- // const newTab = this._addTab(tab, { defaultPanelComponent });
171- // openTabIDs.push(newTab.id);
172- // });
173- // this._initialState = {
174- // selectedTabID: selectedTabID + '', //make sure it is type of string
175- // openTabIDs
176- // };
177- // }
178- // return this._initialState;
179- // },
180- onChange : function ( { newState, oldState, closedTabsId, openedTabsId, isSwitched} ) {
181- if ( isSwitched || openedTabsId . length || closedTabsId . length ) {
166+ onChange : function ( { newState, oldState, closedTabIDs, openedTabIDs, isSwitched} ) {
167+ if ( isSwitched || openedTabIDs . length || closedTabIDs . length ) {
182168 this . trigger ( 'onChange' , this . userProxy , {
183169 currentData : { ...newState } ,
184170 perviousData : { ...oldState } ,
171+ closedTabIDs,
172+ openedTabIDs,
185173 } ) ;
186- openedTabsId . length && this . trigger ( 'onOpen' , this . userProxy , openedTabsId ) ;
187- closedTabsId . length && this . trigger ( 'onClose' , this . userProxy , closedTabsId ) ;
174+ openedTabIDs . length && this . trigger ( 'onOpen' , this . userProxy , openedTabIDs ) ;
175+ closedTabIDs . length && this . trigger ( 'onClose' , this . userProxy , closedTabIDs ) ;
188176 isSwitched &&
189177 this . trigger ( 'onSelect' , this . userProxy , {
190178 currentSelectedTabId : newState . selectedTabID ,
0 commit comments