The GridConfig switches that choose built-in commands. They apply to every
renderer of the command model: the toolbar, the full ribbon and the compact
ribbon. Each defaults to true, except export.
Declaration
export type CommandFlags = Pick <
Referenced by
Workspace packages depending on @sheetwrite/core
@sheetwrite/benchdependency
@sheetwrite/chartsdependency
@sheetwrite/docs-startdependency
@sheetwrite/reactdependency
@sheetwrite/sveltedependency
@sheetwrite/vuedependency
@sheetwrite/xlsxdependency
Public exports naming CommandFlags
interface GridConfig {
toolbar?: boolean | ToolbarItem[];
bold?: boolean;
italic?: boolean;
align?: boolean;
textColor?: boolean;
fillColor?: boolean;
border?: boolean;
clearFormat?: boolean;
merge?: boolean;
sort?: boolean;
export?: boolean;
ribbon?: boolean | RibbonConfig;
icons?: IconOverrides;
contextMenu?: boolean | ContextMenuItems;
// … 8 more lines — see the API reference
} interface GridConfig {
toolbar ?: boolean | ToolbarItem [];
bold ?: boolean ;
italic ?: boolean ;
align ?: boolean ;
textColor ?: boolean ;
fillColor ?: boolean ;
border ?: boolean ;
clearFormat ?: boolean ;
merge ?: boolean ;
sort ?: boolean ;
export ?: boolean ;
ribbon ?: boolean | RibbonConfig ;
icons ?: IconOverrides ;
contextMenu ?: boolean | ContextMenuItems ;
// … 8 more lines — see the API reference
} interface GridConfig {
toolbar ?:
boolean | ToolbarItem [];
bold ?: boolean ;
italic ?: boolean ;
align ?: boolean ;
textColor ?: boolean ;
fillColor ?: boolean ;
border ?: boolean ;
clearFormat ?: boolean ;
merge ?: boolean ;
sort ?: boolean ;
export ?: boolean ;
ribbon ?: boolean | RibbonConfig ;
icons ?: IconOverrides ;
contextMenu ?:
boolean | ContextMenuItems ;
undo ?: boolean ;
find ?: boolean ;
// … 9 more lines — see the API reference
} Toolbar / feature configuration. When config is set the built-in toolbar is shown; control flags default to true except the opt-in export flag. @example import type { GridConfig } from "@sheetwrite/core"; const config: GridConfig = { toolbar: true, contextMenu: [{ action: "copy" }, { action: "paste" }], keyboard(event, grid) { if (event.altKey && event.key === "b") { grid.actions.toggleBold(); return true; } return false; }, }; @see Grid.setConfig @see ContextMenuItem API reference →