Skip to content

Commit

Permalink
fix for code review
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Aug 16, 2021
1 parent e26cbf8 commit ddb3c18
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,7 @@ export const HoverActions: React.FC<Props> = React.memo(

{additionalContent != null && <AdditionalContent>{additionalContent}</AdditionalContent>}

{enableOverflowButton && overflowActionItems}

{!enableOverflowButton && allActionItems}
{enableOverflowButton ? overflowActionItems : allActionItems}
</StyledHoverActionsContainer>
</EuiFocusTrap>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ export const useHoverActionItems = ({
: SourcererScopeName.default;
const { browserFields } = useSourcererScope(activeScope);

/*
* In the case of `DisableOverflowButton`, we show filters only when topN is NOT opened. As after topN button is clicked, the chart panel replace current hover actions in the hover actions' popover, so we have to hide all the actions.
* in the case of `EnableOverflowButton`, we only need to hide all the items in the overflow popover as the chart's panel opens in the overflow popover, so non-overflowed actions are not affected.
*/
const showFilters =
values != null && (enableOverflowButton || (!showTopN && !enableOverflowButton));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const EventDetailsPanelComponent: React.FC<EventDetailsPanelProps> = ({

return isFlyoutView ? (
<>
<EuiFlyoutHeader hasBorder={isHostIsolationPanelOpen ? true : false}>
<EuiFlyoutHeader hasBorder={isHostIsolationPanelOpen}>
{isHostIsolationPanelOpen ? (
backToAlertDetailsLink
) : (
Expand Down

0 comments on commit ddb3c18

Please sign in to comment.