From 840860019a78896dbde91372b2445da9b6e8403e Mon Sep 17 00:00:00 2001 From: Nick Partridge Date: Thu, 27 May 2021 18:43:45 -0500 Subject: [PATCH] fix: annotation tooltip display when remounting specs (#1167) --- .../xy_chart/state/selectors/get_annotation_tooltip_state.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts b/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts index 22a74e779e..db63366c93 100644 --- a/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts +++ b/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts @@ -133,9 +133,7 @@ function getTooltipStateForDOMElements( } const dimension = (annotationDimensions.get(hoveredDOMElement.createdBySpecId) ?? []) .filter(isAnnotationLineProps) - .find((d) => { - return d.id === hoveredDOMElement.id && d.datum === hoveredDOMElement.datum; - }); + .find(({ id }) => id === hoveredDOMElement.id); if (!dimension) { return null;