Skip to content

Commit

Permalink
fix multiple scrolls on waterfall view
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jan 5, 2021
1 parent 0188b9f commit f962218
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,18 @@ export const PageHeader = () => {
const DatePickerComponent = () =>
isCertRoute ? (
<CertRefreshBtn />
) : isStepDetailRoute ? null : (
) : (
<StyledPicker grow={false} style={{ flexBasis: 485 }}>
<UptimeDatePicker />
</StyledPicker>
);

const isMonRoute = useRouteMatch(MONITOR_ROUTE);

if (isStepDetailRoute) {
return null;
}

return (
<>
<SyntheticsCallout />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface WaterfallChartOuterContainerProps {
}

export const WaterfallChartOuterContainer = euiStyled.div<WaterfallChartOuterContainerProps>`
height: ${(props) => (props.height ? `${props.height}px` : 'auto')};
height: calc(100vh - 228px);
overflow-y: ${(props) => (props.height ? 'scroll' : 'visible')};
overflow-x: hidden;
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export const WaterfallChart = ({
barStyleAccessor,
renderSidebarItem,
renderLegendItem,
maxHeight = 800,
}: WaterfallChartProps) => {
const { data, sidebarItems, legendItems } = useWaterfallContext();

Expand All @@ -106,7 +105,7 @@ export const WaterfallChart = ({
legendItems && legendItems.length > 0 && renderLegendItem ? true : false;

return (
<WaterfallChartOuterContainer height={maxHeight}>
<WaterfallChartOuterContainer>
<>
<WaterfallChartFixedTopContainer>
<EuiFlexGroup gutterSize="none" responsive={false}>
Expand Down

0 comments on commit f962218

Please sign in to comment.