Interface WorkbookStripProps

Tab strip that operates on IWorkbookModel

interface WorkbookStripProps {
    background?: string;
    borderColor?: string;
    borderWidth?: number;
    commands?: CommandMap;
    contextMenuProps?: SheetTabMenuProps;
    disabled?: boolean;
    gridStyle?: GridStyle;
    gridTheme?: Theme;
    notifier?: Notifier;
    readOnly?: boolean;
    renderContextMenu?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderSheetTab?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderSheetsAll?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    sheetTabProps?: SheetTabProps;
    sheetsAllProps?: SheetsAllMenuProps;
    sx?: SxProps<Theme>;
    workbookModel?: IWorkbookModel;
    onBeforeUserChange?(index): boolean | void;
    onUserChange?(index): void;
}

Hierarchy

  • HTMLAttributes<HTMLDivElement>
    • WorkbookStripProps

Properties

background?: string
borderColor?: string
borderWidth?: number
commands?: CommandMap
contextMenuProps?: SheetTabMenuProps

Allow for customizations on context menu

disabled?: boolean

If true, the tab strip is disabled

Default Value

false
gridStyle?: GridStyle
gridTheme?: Theme
notifier?: Notifier
readOnly?: boolean

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

Remarks

This can be set to true but if models.getProtection().lockStructure is true than false is ignored.

Default Value

models.getProtection().lockStructure
renderContextMenu?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>)

Render custom menu

Type declaration

    • (props): ReactElement<any, string | JSXElementConstructor<any>>
    • Parameters

      Returns ReactElement<any, string | JSXElementConstructor<any>>

Returns

renderSheetTab?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>)

Render custom sheet tabs.

Type declaration

    • (props): ReactElement<any, string | JSXElementConstructor<any>>
    • Parameters

      Returns ReactElement<any, string | JSXElementConstructor<any>>

Returns

renderSheetsAll?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>)

Render custom menu

Type declaration

    • (props): ReactElement<any, string | JSXElementConstructor<any>>
    • Parameters

      Returns ReactElement<any, string | JSXElementConstructor<any>>

Returns

sheetTabProps?: SheetTabProps

Allow for customizations om sheet tabs.

sheetsAllProps?: SheetsAllMenuProps

Allow for customizations on context menu

sx?: SxProps<Theme>

MUI SX props

workbookModel?: IWorkbookModel

Methods

  • Called when the user has initiated a change to the active tab but before it has been rendered. This allows for cleanup events or a chance to cancel the change by returning false.

    Parameters

    • index: number

    Returns boolean | void

  • Called after the tab has been changed.

    Parameters

    • index: number

    Returns void