Skip to content

Commit

Permalink
chore: split fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LidiyaGeorgieva committed Feb 4, 2025
1 parent a26b1ae commit f4f333e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/fiori/src/SideNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,19 +492,17 @@ class SideNavigation extends UI5Element {

let itemDomRef;

if (isInstanceOfSideNavigationItemBase(item) && item.getDomRef()) {
itemDomRef = item.getDomRef();
if (isInstanceOfSideNavigationItemBase(item)) {
itemDomRef = item.getDomRef()!;
} else {
itemDomRef = item;
}

if (itemDomRef) {
const { marginTop, marginBottom } = window.getComputedStyle(itemDomRef);
itemsHeight += itemDomRef.offsetHeight + parseFloat(marginTop) + parseFloat(marginBottom);
const { marginTop, marginBottom } = window.getComputedStyle(itemDomRef);
itemsHeight += itemDomRef.offsetHeight + parseFloat(marginTop) + parseFloat(marginBottom);

if (itemsHeight > listHeight) {
item.classList.add("ui5-sn-item-hidden");
}
if (itemsHeight > listHeight) {
item.classList.add("ui5-sn-item-hidden");
}
});

Expand Down

0 comments on commit f4f333e

Please sign in to comment.