SheetXL - v1.0.2
    Preparing search index...

    Interface UseBorderOptions

    interface UseBorderOptions {
        cache?: BordersCache;
        defaultColor?: string;
        forceThinBorder?: boolean;
        getBorderAt?: (value: any, index: number) => IBorders;
        getMergeAt?: (value: any, index: number) => Coords | null;
        getVisibleCells: (
            pane: IGridPane,
        ) => { cell: CellCoords; range?: Coords; value?: any }[];
        mode?: UseBordersMode;
        normalColumns?: BorderNormalLine | null;
        normalRows?: BorderNormalLine | null;
        rendererBorder?: (props: BorderRenderProps) => ReactNode;
    }
    Index
    cache?: BordersCache

    Shared by layers that draw the same cells, so the cells are read into borders once for all of them. Layers share a read when getVisibleCells returns the same array and getBorderAt, getMergeAt, and defaultColor are the same.

    defaultColor?: string
    forceThinBorder?: boolean

    Force all rendering to be a single border line. Use for previews.

    getBorderAt?: (value: any, index: number) => IBorders

    For finding the border. The value is the value returned from getVisibleCells and the index is the index found.

    Type Declaration

      • (value: any, index: number): IBorders
      • Parameters

        • value: any

          ?

        • index: number

          ?

        Returns IBorders

        The IBorders at the location.

    getMergeAt?: (value: any, index: number) => Coords | null

    The merged range a cell belongs to, or null when it is not merged. A merged cell's diagonals run corner to corner across the whole merge. When omitted every cell is its own box.

    Type Declaration

      • (value: any, index: number): Coords | null
      • Parameters

        • value: any

          The value returned from getVisibleCells.

        • index: number

          The index of that value.

        Returns Coords | null

    getVisibleCells: (
        pane: IGridPane,
    ) => { cell: CellCoords; range?: Coords; value?: any }[]

    Returns a list of visible cells.

    Type Declaration

      • (pane: IGridPane): { cell: CellCoords; range?: Coords; value?: any }[]
      • Parameters

        • pane: IGridPane

          IGridPane

        Returns { cell: CellCoords; range?: Coords; value?: any }[]

        An array of visible coords

    'direct'
    
    normalColumns?: BorderNormalLine | null

    The vertical line drawn where no cell border owns the boundary (see UseBordersMode). null draws none.

    normalRows?: BorderNormalLine | null

    The horizontal line drawn where no cell border owns the boundary (see UseBordersMode). null draws none.

    rendererBorder?: (props: BorderRenderProps) => ReactNode

    Allow users to customize border rendering. Note - This is wrapped in a single SVG so must be an SVG Element type (like a path).