Skip to content

Commit cfe0a84

Browse files
committed
Update index.tsx
1 parent 74af199 commit cfe0a84

File tree

1 file changed

+7
-3
lines changed
  • packages/main/src/components/ObjectPage

1 file changed

+7
-3
lines changed

packages/main/src/components/ObjectPage/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,13 +496,17 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
496496
if ((currentTabModeSection && !lastSubSection) || (sectionNodes.length === 1 && !lastSubSection)) {
497497
setSectionSpacer(0);
498498
} else if (tabContainerContainer) {
499-
const isTabBarMode = mode === ObjectPageMode.IconTabBar;
500-
const paddingWithTabBar = isTabBarMode ? 8 : TAB_CONTAINER_HEADER_HEIGHT + 8;
499+
const footerHeight =
500+
objectPageRef.current.querySelector<HTMLDivElement | undefined>('[data-component-name="ObjectPageFooter"]')
501+
?.offsetHeight ?? 0;
502+
501503
setSectionSpacer(
502504
objectPage.getBoundingClientRect().bottom -
503505
tabContainerContainer.getBoundingClientRect().bottom -
504506
lastSubSectionOrSection.getBoundingClientRect().height -
505-
paddingWithTabBar
507+
footerHeight -
508+
// section padding
509+
8
506510
);
507511
}
508512
});

0 commit comments

Comments
 (0)