Files
twenty/packages
Emmanuel Hernández Bazán 981ee6a2d7 fix: stabilize tooltip anchor ID with useRef to prevent hover glitch (#21888)
## Context

Tooltip components were generating a new anchor ID on every render. This
caused a flicker/glitch when hovering: the tooltip would briefly
disappear and reappear because React reconciled the changed ID as a
different element.

## Solution

Changed the anchor ID generation from inline (re-created every render)
to `useRef` (stable across renders). The ID is now created once on mount
and stays the same for the lifetime of the component.

## Test plan

- [x] Hover over any element with a tooltip — no flicker or
disappear/reappear behavior
- [x] Multiple tooltips on the same page still work independently

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/21888?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

---------

Co-authored-by: Emmanuel Hernandez <emmanuel.hernandez@clickbalance.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2026-06-25 13:12:11 +02:00
..