From 86a9fe4c5e3d329c1062a902f305ae14e3737603 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Tue, 31 Oct 2023 22:32:57 -0300 Subject: [PATCH] fix: anchor filter on dom change --- src/components/Tooltip/Tooltip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 5413a652..6f3d533d 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -568,7 +568,7 @@ const Tooltip = ({ }) if (newAnchors.length || removedAnchors.length) { setAnchorsBySelect((anchors) => [ - ...anchors.filter((anchor) => removedAnchors.includes(anchor)), + ...anchors.filter((anchor) => !removedAnchors.includes(anchor)), ...newAnchors, ]) }