fixes bug with invisible object viewer tabs

This commit is contained in:
sergeyteleshev
2025-07-04 12:44:52 +02:00
parent c6f247ed64
commit 03b8e7b1cc
3 changed files with 4 additions and 8 deletions
@@ -76,7 +76,7 @@ const TabsBoxContainer: React.FC<FlexibleTabsProps> = ({ tabs, multipleRows, cla
return (
<div ref={containerRef} className={s(style, { tabContainer: true, multipleRows }, className)}>
{tabs.map((tabContent, index) => (
<div key={tabContent?.toString()} className={s(style, { expand: expandIndices.has(index) })}>
<div key={tabContent?.toString()} className={s(style, { expand: multipleRows &&expandIndices.has(index) })}>
{tabContent}
</div>
))}
@@ -68,11 +68,11 @@ export const ObjectViewerPanel: TabHandlerPanelComponent<IObjectViewerTabState>
<TabsBox
currentTabId={tab.handlerState.pageId}
tabsClassName={s(style, { tabs: true })}
tabs={pages.map(page => (
tabs={pages.length > 1 ? pages.map(page => (
<SContext key={page.key} registry={tabsRegistry}>
<DBObjectPageTab tab={tab} page={page} onSelect={dbObjectPagesService.selectPage} />
</SContext>
))}
)) : []}
localState={innerTabState}
>
{pages.map(page => (
@@ -8,8 +8,4 @@
.tab {
composes: theme-ripple theme-background-surface theme-text-text-primary-on-light from global;
}
.tabOuter:only-child {
display: none;
}
}