Interface WorkbookProps

interface WorkbookProps {
    autoFocus?: boolean;
    commands?: CommandMap;
    contextMenuProps?: WorkbookContextMenuProps;
    createWorkbookOptions?: IWorkbookModelOptions;
    forceLightImages?: boolean;
    formulaBarProps?: FormulaBarProps;
    gridTheme?: Theme;
    loadingPanelProps?: LoadingPanelProps;
    model?: IWorkbookModel;
    notifier?: Notifier;
    onCommandsChange?: ((commands) => void);
    onElementLoad?: ((event) => void);
    onRepeatCommandChange?: ((command) => void);
    renderContextMenu?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderFormulaBar?: ((props, ref) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderLoadingPanel?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderSheet?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderStatusBar?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderTabs?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    renderToolbar?: ((props) => ReactElement<any, string | JSXElementConstructor<any>>);
    sheetProps?: SheetProps;
    showFormulaBar?: boolean;
    showHorizontalScrollbar?: boolean;
    showStatusBar?: boolean;
    showTabs?: boolean;
    showVerticalScrollbar?: boolean;
    statusBarProps?: StatusBarProps;
    sx?: SxProps<Theme>;
    tabsProps?: WorkbookStripProps;
    toolbarProps?: WorkbookToolbarsProps;
}

Hierarchy (view full)

Properties

autoFocus?: boolean

Will autofocus to the sheet.

Default Value

false
commands?: CommandMap

Additional commands provided by application

contextMenuProps?: WorkbookContextMenuProps

Allow for customizations on context menu

createWorkbookOptions?: IWorkbookModelOptions

Options to use when a new WorkbookModel is created.

Remarks

This is ignored if the model is provided externally. The default behavior is to use the options from the current workbook if provided.

forceLightImages?: boolean

If dark theme then the images will invert unless true.

Default Value

false
formulaBarProps?: FormulaBarProps

Allow for customizations on FormulaBar

gridTheme?: Theme

Allow you to specify a specific material ui theme for the grid

Remarks

This is useful if you want to decorate the application with a single theme (such as dark mode). But render the main grid using a different theme (for example light mode).

Default Value

the current Theme
loadingPanelProps?: LoadingPanelProps

Allow for customizations on loading panel

A memory model of the workbook. If one is not provided a default workbook model will be used. This can be accessed via the workbook ref.

notifier?: Notifier

Configure the notifier to use for alerts

onCommandsChange?: ((commands) => void)

Notify that there is a new map of commands

Type declaration

    • (commands): void
    • Parameters

      Returns void

onElementLoad?: ((event) => void)

Callback for when the workbook is loaded. Useful for hiding/showing loading panels

Type declaration

onRepeatCommandChange?: ((command) => void)

Notify that there is a new repeatable command

Type declaration

    • (command): void
    • Parameters

      Returns void

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

Render custom context menu

Type declaration

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

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

Returns

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

Render FormulaBar

Type declaration

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

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

Returns

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

Render custom loading panel

Type declaration

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

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

Returns

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

Render Sheet

Type declaration

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

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

Returns

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

Pass in a custom toolbar

Type declaration

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

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

Returns

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

Render custom tabs

Type declaration

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

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

Returns

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

Pass in a custom toolbar

Type declaration

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

      • props: WorkbookToolbarsProps

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

Returns

sheetProps?: SheetProps

Allow for customizations on loading panel

showFormulaBar?: boolean

Default Value

'workbook model but can be overridden'
showHorizontalScrollbar?: boolean

Show the horizontal scrollbar

showStatusBar?: boolean

Shows the statusbar

Default Value

'workbook model but can be overridden'
showTabs?: boolean

This doesn't influence # of tabs just the visibility of the widget.

Default Value

'workbook model but can be overridden'
showVerticalScrollbar?: boolean

Show the vertical scrollbar

statusBarProps?: StatusBarProps

Customizations for the status bar

sx?: SxProps<Theme>

MUI SX props

tabsProps?: WorkbookStripProps

Allow for customizations on tabs

toolbarProps?: WorkbookToolbarsProps

Props for the toolbar.