Skip to content

Commit

Permalink
[Security Solution] Hide empty state for timeline when graph overlay …
Browse files Browse the repository at this point in the history
…is rendered (#132835) (#133529)

* Hide empty state for timeline when graph overlay is rendered

* Add unit test to not render empty state when overlay is open

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit c51fb17)
  • Loading branch information
kqualters-elastic authored Jun 3, 2022
1 parent b10feb7 commit 25e29c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,13 @@ describe('integrated t_grid', () => {
euiDarkVars.paddingSizes.xl
);
});
it(`does not render the empty state when the graph overlay is open`, () => {
render(
<TestProviders>
<TGridIntegrated {...defaultProps} graphOverlay={<div />} />
</TestProviders>
);

expect(screen.queryByTestId('tGridEmptyState')).toBeNull();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ const TGridIntegratedComponent: React.FC<TGridIntegratedProps> = ({
)}
</UpdatedFlexGroup>
<>
{!hasAlerts && !loading && <TGridEmpty height="short" />}
{!hasAlerts && !loading && !graphOverlay && <TGridEmpty height="short" />}
{hasAlerts && (
<FullWidthFlexGroup
$visible={!graphEventId && graphOverlay == null}
Expand Down

0 comments on commit 25e29c1

Please sign in to comment.