diff --git a/x-pack/plugins/security_solution/public/common/components/with_hover_actions/index.tsx b/x-pack/plugins/security_solution/public/common/components/with_hover_actions/index.tsx index 97705533689e9..a21f1377d0dfd 100644 --- a/x-pack/plugins/security_solution/public/common/components/with_hover_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/with_hover_actions/index.tsx @@ -17,10 +17,6 @@ const WithHoverActionsPopover = (styled(EuiPopover as any)` } ` as unknown) as typeof EuiPopover; -const Container = styled.div` - width: fit-content; -`; - interface Props { /** * Always show the hover menu contents (default: false) @@ -68,7 +64,10 @@ export const WithHoverActions = React.memo( setShowHoverContent(false); }, []); - const content = useMemo(() => <>{render(showHoverContent)}, [render, showHoverContent]); + const content = useMemo( + () =>
{render(showHoverContent)}
, + [onMouseEnter, render, showHoverContent] + ); useEffect(() => { setIsOpen(hoverContent != null && (showHoverContent || alwaysShow)); @@ -79,7 +78,7 @@ export const WithHoverActions = React.memo( }, [closePopOverTrigger]); return ( - +
( > {isOpen ? <>{hoverContent} : null} - +
); } );