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

    Interface SheetReferenceLayerProps

    Draws the current reference selection over the grid (Excel-style colored rectangles), highlighting the active reference. A pane layer (mounted per pane by SheetElement), it reads the app-wide reference-mode bus (useReferenceMode) — not any edit session — so it renders whenever a reference selection is present, regardless of what produced it: a formula edit (via SheetCellInput) or, later, a selected chart showing its source data with no active input at all.

    The bus's IRangeSelection can hold a multi-sheet set of ranges (a formula's references, each with its own RangeCoords.scope) — e.g. editing =B1+Sheet2!C1 on Sheet1: B1 and Sheet2!C1 are both ranges in the ONE shared selection, but only B1 belongs on Sheet1's pane. The MODEL handed to RangesPickerLayer is the shared selection unfiltered (a plain SheetSelection, same one every pane uses) — each pane instead filters what it draws via getRangeStyle, returning null for a range whose scope isn't this pane's sheet. This is a per-instance render filter, not a data split (see RangesPickerLayer.getRangeStyle's doc): writes still land at the range's real, unfiltered index with no remapping, and every committed write is stamped with the committing pane's sheet by scopeDrawnRanges (always-scoped reporting — the consumer localizes; commitRange's {...range, ...box} spread preserves an existing range's scope mid-gesture either way).

    interface SheetReferenceLayerProps {
        children?: ReactNode;
        className?: string;
        onBlur?: (event: FocusEvent) => void;
        onContextMenu?: (event: MouseEvent) => void;
        onDoubleClick?: (event: MouseEvent) => void;
        onFocus?: (event: FocusEvent) => void;
        onKeyDown?: (event: KeyboardEvent) => void;
        onKeyPress?: (event: KeyboardEvent) => void;
        onKeyUp?: (event: KeyboardEvent) => void;
        onMouseDown?: (event: MouseEvent) => void;
        onMouseEnter?: (event: MouseEvent) => void;
        onMouseLeave?: (event: MouseEvent) => void;
        onMouseMove?: (event: MouseEvent) => void;
        onMouseOut?: (event: MouseEvent) => void;
        onMouseOver?: (event: MouseEvent) => void;
        onMouseUp?: (event: MouseEvent) => void;
        onPointerDown?: (event: PointerEvent) => void;
        onPointerLeave?: (event: PointerEvent) => void;
        onPointerMove?: (event: PointerEvent) => void;
        onPointerUp?: (event: PointerEvent) => void;
        sheet: ISheet;
        sheetView?: ISheetView;
        style?: CSSProperties;
        zIndex?: number;
    }

    Hierarchy

    • LayerProps
      • SheetReferenceLayerProps
    Index
    children?: ReactNode

    The layer's content — VirtualDivs, RangeRects, floats — hosted inside the layer's boundary div. Children stack by DOM order within the layer (law 1).

    className?: string

    Class for the layer's boundary div (devtools identification).

    onBlur?: (event: FocusEvent) => void
    onContextMenu?: (event: MouseEvent) => void
    onDoubleClick?: (event: MouseEvent) => void
    onFocus?: (event: FocusEvent) => void
    onKeyDown?: (event: KeyboardEvent) => void
    onKeyPress?: (event: KeyboardEvent) => void
    onKeyUp?: (event: KeyboardEvent) => void
    onMouseDown?: (event: MouseEvent) => void
    onMouseEnter?: (event: MouseEvent) => void
    onMouseLeave?: (event: MouseEvent) => void
    onMouseMove?: (event: MouseEvent) => void
    onMouseOut?: (event: MouseEvent) => void
    onMouseOver?: (event: MouseEvent) => void
    onMouseUp?: (event: MouseEvent) => void
    onPointerDown?: (event: PointerEvent) => void
    onPointerLeave?: (event: PointerEvent) => void
    onPointerMove?: (event: PointerEvent) => void
    onPointerUp?: (event: PointerEvent) => void
    sheet: ISheet

    The sheet this pane renders — ranges belonging to a different sheet are filtered out of this pane.

    sheetView?: ISheetView

    The sheet view — enables the formula-view fallback: while isShowFormulas() and no reference-mode state is on the bus, the selection anchor's formula (when it IS a formula) has its references outlined read-only (same palette as the anchor's colored formula text — see useFormulaViewAnchor). Omit for a host with no formula view.

    style?: CSSProperties

    Style for the layer's boundary div — e.g. display: 'none' or opacity to hide or fade a layer. The boundary's own placement (position, inset, pointer-events: none) comes from the grid; overriding it here breaks the layer's containment.

    zIndex?: number

    Explicit stacking override, read by normalizeLayers off the grid-child element to sort the layer list (higher sorts later = on top; omitted ⇒ declaration order). It is honored ONLY at the grid-children level — the layer's actual dispatch slot always comes from the resulting order index (via LayerOrderContext), never from this raw number, so paint order and event order can never disagree.