From 3d583191941411ebfad104d43cefeaf1d87a9afc Mon Sep 17 00:00:00 2001 From: Naresh Pingale Date: Tue, 23 Jul 2024 12:03:12 +0530 Subject: [PATCH] fix: code formating and disableTooltip check for anchorById --- src/components/Tooltip/Tooltip.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 3e70182e..1471e930 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -460,14 +460,14 @@ const Tooltip = ({ const elementRefs = new Set(anchorRefs) anchorsBySelect.forEach((anchor) => { - if(disableTooltip?.(anchor)){ - return; + if (disableTooltip?.(anchor)) { + return } elementRefs.add({ current: anchor }) }) const anchorById = document.querySelector(`[id='${anchorId}']`) - if (anchorById) { + if (anchorById && !disableTooltip?.(anchorById)) { elementRefs.add({ current: anchorById }) }