@@ -157,6 +157,13 @@ export default class SubItemsModule extends Component {
157157 }
158158
159159 this . adaptHeaderActions ( ) ;
160+
161+ const subitemsTab = this . _refMainContainerWrapper . current . closest ( '.ibexa-tab-content__pane' ) ;
162+ const subitemsNavTab = document . querySelector ( `.ibexa-tabs__link[href="#${ subitemsTab . id } "]` ) ;
163+
164+ subitemsNavTab . addEventListener ( 'shown.bs.tab' , ( ) => {
165+ this . popperInstance . forceUpdate ( ) ;
166+ } ) ;
160167 }
161168
162169 componentDidUpdate ( ) {
@@ -191,6 +198,7 @@ export default class SubItemsModule extends Component {
191198 const { subItemsWidth } = this . state ;
192199
193200 if ( calculatedWidth !== subItemsWidth ) {
201+ this . popperInstance . forceUpdate ( ) ;
194202 this . setState ( { subItemsWidth : calculatedWidth } ) ;
195203 }
196204 }
@@ -1432,14 +1440,6 @@ export default class SubItemsModule extends Component {
14321440 const isTableViewActive = activeView === VIEW_MODE_TABLE ;
14331441 const pageLoaded = ! ! activePageItems ;
14341442 const bulkBtnDisabled = nothingSelected || ! isTableViewActive || ! pageLoaded ;
1435- const actionBtns = [
1436- ...this . props . extraActions . map ( this . renderExtraActions ) ,
1437- this . renderBulkMoveBtn ( bulkBtnDisabled ) ,
1438- this . renderBulkAddLocationBtn ( bulkBtnDisabled ) ,
1439- this . renderBulkHideBtn ( bulkHideBtnDisabled ) ,
1440- this . renderBulkUnhideBtn ( bulkUnhideBtnDisabled ) ,
1441- this . renderBulkDeleteBtn ( bulkBtnDisabled ) ,
1442- ] ;
14431443 let bulkHideBtnDisabled = true ;
14441444 let bulkUnhideBtnDisabled = true ;
14451445 let listClassName = 'm-sub-items__list' ;
@@ -1455,6 +1455,15 @@ export default class SubItemsModule extends Component {
14551455 bulkUnhideBtnDisabled = ! selectedItemsValues . some ( ( item ) => ! ! item . hidden ) ;
14561456 }
14571457
1458+ const actionBtns = [
1459+ ...this . props . extraActions . map ( this . renderExtraActions ) ,
1460+ this . renderBulkMoveBtn ( bulkBtnDisabled ) ,
1461+ this . renderBulkAddLocationBtn ( bulkBtnDisabled ) ,
1462+ this . renderBulkHideBtn ( bulkHideBtnDisabled ) ,
1463+ this . renderBulkUnhideBtn ( bulkUnhideBtnDisabled ) ,
1464+ this . renderBulkDeleteBtn ( bulkBtnDisabled ) ,
1465+ ] ;
1466+
14581467 return (
14591468 < div ref = { this . _refMainContainerWrapper } >
14601469 < div className = "m-sub-items" style = { { width : `${ subItemsWidth } px` } } >
0 commit comments