SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function useCycleHighlight

    • Outlines a reference cycle's MEMBERS on the grid for as long as the caller is mounted — the highlight behind a circular tooltip.

      Parameters

      • sheet: ISheet | null
      • cycle: ICircularReference | null | undefined

      Returns void

      The cycle's getMembers() go onto the reference-mode bus as a detached selection with no active index, the same shape the formula-view fallback publishes for a formula's references (SheetReferenceLayer), so the members are outlined by the machinery that already colors references — and the tooltip's addresses, colored by the same index, line up with them.

      Marked readOnly, because these outlines are an annotation: there is no text behind them for a drag to write back to.

      Only when nobody owns the bus. An edit or a pick in progress always wins — the highlight is not published at all while one is live, and a producer that starts DURING a hover replaces it (the cleanup then finds someone else's state and leaves it alone, rather than clearing a live edit's references out from under it). A cycle with no live members publishes nothing.