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

    Interface SheetCellRendererProps

    interface SheetCellRendererProps {
        allowTextOverflow?: boolean;
        bounds: Bounds;
        cell: CellCoords;
        "data-rc"?: string;
        docTheme?: ITheme;
        normalStyle?: IStyle;
        onLinkMouseDown?: (event: MouseEvent<HTMLDivElement, MouseEvent>) => void;
        range?: RangeCoords;
        showFormulas?: boolean;
        showZeros?: boolean;
        value: ICell;
        zoom?: number;
    }

    Hierarchy

    • CellRendererProps<ICell>
      • SheetCellRendererProps
    Index
    allowTextOverflow?: boolean

    Allow text that does not fit to paint over its empty neighbors, as it does in a sheet.

    true
    

    Set false when the cell is being drawn somewhere its own sheet's geometry does not apply — a list or menu built from real cells. The extrusion the SDK reports (ICell.getTextOverflow) is measured against the SOURCE column's width and ITS neighbors, so away from the sheet it places text against a geometry the surrounding pixels do not have. With this off the renderer lays out purely in the bounds it is given, and text that does not fit is clipped.

    Only text can extrude — a number or date that does not fit is replaced by # either way.

    bounds: Bounds

    The range bounds relative to the current viewport and zoom.

    cell: CellCoords

    The cell coords that is being rendered.

    "data-rc"?: string

    Absolute cell-coordinate stamp ("rowIndex:colIndex"), provided by the layer.

    A renderer that spreads its rest props onto its root element carries this automatically; a custom renderer must place it on its root itself. It is the hook the layer's live suppression rule targets (see CellLayerProps.suppressCell) — per-coordinate CSS over immutable cached tiles, so transient state (an open editor) never invalidates the tile cache. Coordinates are SHEET-absolute (never tile- or pane-relative): a cell rendered in more than one pane (a merge spanning a freeze line) matches the one selector in every instance.

    docTheme?: ITheme

    Ability to query the theme colors. Note - There are also css variables that can be used to style using doc theme colors

    normalStyle?: IStyle

    An optimization that tells the render all of the styling is normal. And doesn't need to be overwritten.

    onLinkMouseDown?: (event: MouseEvent<HTMLDivElement, MouseEvent>) => void

    Callback for when a link has been clicked.

    Type Declaration

      • (event: MouseEvent<HTMLDivElement, MouseEvent>): void
      • Parameters

        • event: MouseEvent<HTMLDivElement, MouseEvent>

          The mouse event

        Returns void

    range?: RangeCoords

    The RangeCoords that is being rendered.

    A range representing the coords
    

    For most cells this is the same as the coords. This will only be different for spanning cells.

    showFormulas?: boolean

    If true, prefer to show the formulas over values

    showZeros?: boolean

    If true, show zero values

    value: ICell

    A value to render.

    zoom?: number

    The zoom CellRendererProps.bounds were measured at.

    1
    

    A renderer is handed the zoom, never the pane it came from: everything it needs to draw one cell is data (the value, the bounds, the scale), so it stays a pure function of its props and can be rendered anywhere a caller can supply bounds — a preview, a tooltip, a cell drawn outside its own column. A renderer that genuinely needs the live view (hover, scroll) reads it from context with useGridPane.

    The bounds already have the zoom applied; this is for what CSS pixels do not carry — an unscaled inset, a glyph size, a stroke width the renderer picks itself.