From 247679d5131bf5fa8bf15e5dfdd64d24aaa0aafc Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Fri, 15 May 2020 12:23:52 -0500 Subject: [PATCH] Fix types --- .../app/ServiceMap/Popover/index.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/index.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/index.tsx index da0a61ee62595..86ef0b880c4da 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/index.tsx @@ -29,15 +29,12 @@ export function Popover({ focusedServiceName }: PopoverProps) { const [selectedNode, setSelectedNode] = useState< cytoscape.NodeSingular | undefined >(undefined); - const deselect = useCallback( - (_event: MouseEvent) => { - if (cy) { - cy.elements().unselect(); - } - setSelectedNode(undefined); - }, - [cy, setSelectedNode] - ); + const deselect = useCallback(() => { + if (cy) { + cy.elements().unselect(); + } + setSelectedNode(undefined); + }, [cy, setSelectedNode]); const renderedHeight = selectedNode?.renderedHeight() ?? 0; const renderedWidth = selectedNode?.renderedWidth() ?? 0; const { x, y } = selectedNode?.renderedPosition() ?? { x: -10000, y: -10000 }; @@ -118,7 +115,9 @@ export function Popover({ focusedServiceName }: PopoverProps) { deselect() + } selectedNodeData={selectedNodeData} selectedNodeServiceName={selectedNodeServiceName} />