Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ import { Icons } from '@superset-ui/core/components/Icons';

export interface TabsProps extends AntdTabsProps {
allowOverflow?: boolean;
fullHeight?: boolean;
}

const StyledTabs = ({
animated = false,
allowOverflow = true,
fullHeight = false,
tabBarStyle,
...props
}: TabsProps) => {
Expand All @@ -43,9 +45,17 @@ const StyledTabs = ({
tabBarStyle={mergedStyle}
css={theme => css`
overflow: ${allowOverflow ? 'visible' : 'hidden'};
${fullHeight && 'height: 100%;'}

.ant-tabs-content-holder {
overflow: ${allowOverflow ? 'visible' : 'auto'};
${fullHeight && 'height: 100%;'}
}
.ant-tabs-content {
${fullHeight && 'height: 100%;'}
}
.ant-tabs-tabpane {
${fullHeight && 'height: 100%;'}
}
.ant-tabs-tab {
flex: 1 1 auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ const StyledDashboardContent = styled.div<{

/* this is the ParentSize wrapper */
& > div:first-child {
height: inherit !important;
height: 100% !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ const DashboardContainer: FC<DashboardContainerProps> = ({ topLevelTabs }) => {
renderTabBar={renderTabBar}
animated={false}
allowOverflow
fullHeight
onFocus={handleFocus}
items={tabItems}
tabBarStyle={{ paddingLeft: 0 }}
Expand Down
3 changes: 3 additions & 0 deletions superset-frontend/src/dashboard/components/DashboardGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const DashboardEmptyStateContainer = styled.div`
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
`;

const GridContent = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const TabsRenderer = memo<TabsRendererProps>(
type={editMode ? 'editable-card' : 'card'}
items={tabItems}
tabBarStyle={{ paddingLeft: tabBarPaddingLeft }}
fullHeight
/>
</StyledTabsContainer>
),
Expand Down
Loading