()
| 224 | } |
| 225 | } |
| 226 | const closeTooltip = () => { |
| 227 | if ( |
| 228 | tooltipElRef.current && |
| 229 | triggerRef.current && |
| 230 | tooltipElRef.current.hasAttribute('popover') && |
| 231 | tooltipElRef.current.matches(':popover-open') |
| 232 | ) { |
| 233 | tooltipElRef.current.hidePopover() |
| 234 | setIsPopoverOpen(false) |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | // context value |
| 239 | const value = useMemo(() => ({tooltipId}), [tooltipId]) |