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

    Interface WorkbookStripProps

    A table tab strip that operates on an IWorkbook.

    interface WorkbookStripProps {
        condensed?: boolean;
        disabled?: boolean;
        onTabContextMenu?: (event: MouseEvent<HTMLElement>, index: number) => void;
        readOnly?: boolean;
        renderScrollButtonEdge?:
            | ((props: ScrollButtonProps) => ReactElement)
            | null;
        renderScrollButtonEnd?: ((props: ScrollButtonProps) => ReactElement) | null;
        renderScrollButtonStart?:
            | ((props: ScrollButtonProps) => ReactElement)
            | null;
        renderSheetTab?: (props: SheetTabProps) => ReactElement;
        seam?: boolean;
        workbook: IWorkbook;
        onBeforeUserChange?(index: number): boolean | void;
        onUserChange?(index: number): void;
    }

    Hierarchy

    • HTMLAttributes<HTMLDivElement>
      • WorkbookStripProps
    Index
    condensed?: boolean

    Condensed (detached) layout: the strip is separated from the grid — e.g. stacked under the scrollbar on a small screen. The selected tab uses a plain rounded tab (rather than the inverted, open-top shape that reads as part of the grid above) and the scroll buttons are hidden. When false (default) the strip reads as an extension of the grid.

    false
    
    disabled?: boolean

    If true, the tab strip is disabled.

    false
    
    onTabContextMenu?: (event: MouseEvent<HTMLElement>, index: number) => void

    Called on a sheet tab's context-menu (right-click) event, after that tab has been selected. The strip itself renders no menu — a host provides one (e.g. the MUI strip's SheetTabMenu).

    readOnly?: boolean

    If true then the tab strips can not be modified but can still be selected.

    !workbook.getProtection().isStructureAllowed()

    renderScrollButtonEdge?: ((props: ScrollButtonProps) => ReactElement) | null
    renderScrollButtonEnd?: ((props: ScrollButtonProps) => ReactElement) | null
    renderScrollButtonStart?: ((props: ScrollButtonProps) => ReactElement) | null

    Scroll-button renderers forwarded to the underlying TabStrip. A host can inject styled variants (e.g. the MUI strip's tooltip-wrapped buttons). Only the "edge" button is currently rendered by TabStrip; start/end are accepted for parity. Pass null to suppress a button (as the strip does for all three in condensed layout).

    renderSheetTab?: (props: SheetTabProps) => ReactElement

    Override how each sheet tab renders. Defaults to a plain SheetTab. A host with its own tab chrome (e.g. the MUI strip's ripple surface) supplies this rather than re-forking the whole strip. The sheet, inverted and (when onTabContextMenu is set) onContextMenu are provided; anything else is the underlying TabStrip tab props.

    seam?: boolean

    Draw the strip's segment of the seam framing the grid along its top edge. Off when the row above already draws that seam and nothing visible sits between them: the stacked layout on a touch device, where the scrollbar track is invisible and the tabs would get a second line 2px under the first.

    true
    
    workbook: IWorkbook

    The workbook. Required — the strip renders this workbook's sheets and cannot function without it.

    • Called when the user has initiated a change to the active tab but before it has been rendered. Return false to cancel.

      Parameters

      • index: number

      Returns boolean | void

    • Called after the tab has been changed.

      Parameters

      • index: number

      Returns void