From 42f70df54696de22e160aab9cfde549eb203414b Mon Sep 17 00:00:00 2001 From: Dariusz Szut Date: Tue, 18 Jan 2022 12:22:17 +0100 Subject: [PATCH] IBX-1720: Changed resize calculation in subitems --- .../ui-dev/src/modules/sub-items/sub.items.module.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/bundle/ui-dev/src/modules/sub-items/sub.items.module.js b/src/bundle/ui-dev/src/modules/sub-items/sub.items.module.js index 6504cae7bb..231a963b9e 100644 --- a/src/bundle/ui-dev/src/modules/sub-items/sub.items.module.js +++ b/src/bundle/ui-dev/src/modules/sub-items/sub.items.module.js @@ -126,11 +126,10 @@ export default class SubItemsModule extends Component { } calculateSubItemsWidth() { - const sideMenu = document.querySelector('.ibexa-main-container__side-column'); - const sideMenuRect = sideMenu.getBoundingClientRect(); - const windowWidth = window.innerWidth; + const mainRow = document.querySelector('.ibexa-main-row'); + const mainRowRect = mainRow.getBoundingClientRect(); - return windowWidth - sideMenuRect.width - SUBITEMS_PADDING; + return mainRowRect.width - SUBITEMS_PADDING; } getDefaultSortClause(sortClauses) { @@ -1140,9 +1139,7 @@ export default class SubItemsModule extends Component { renderBulkAddLocationBtn(disabled) { const label = Translator.trans(/*@Desc("Add Locations")*/ 'add_locations_btn.label', {}, 'sub_items'); - return ( - - ); + return ; } renderBulkHideBtn(disabled) {