Skip to content
Sheetwrite

Sheetwrite / Documentation

GridController@sheetwrite/core/adapter

The lifecycle handle returned by createGridController: the live grid, a theme passthrough, and a single teardown that detaches every subscription and destroys the grid.

The lifecycle handle returned by createGridController: the live grid, a theme passthrough, and a single teardown that detaches every subscription and destroys the grid.

Members 7

grid The imperative core grid this controller owns.
readonly grid: Grid;
setTheme Apply the host's declarative theme prop: option-level replacement via Grid.replaceTheme; undefined restores CSS/default resolution.
setTheme(theme: Partial<Theme> | undefined): void;
setReadOnly Update editability without replacing the owned grid.
setReadOnly(readOnly: boolean): void;
setConfig Update built-in chrome and keyboard configuration without replacing the grid.
setConfig(config: GridConfig | undefined): void;
setOverscan Live-update the render overscan without replacing the grid; undefined restores the default.
setOverscan(overscan: number | undefined): void;
setMinColumns Live-update the minimum rendered column count without emitting user edits.
setMinColumns(minColumns: number | undefined): void;
destroy Detach every event subscription and destroy the grid.
destroy(): void;

Detach every event subscription and destroy the grid. Call exactly once.

Declaration

View full TypeScript declaration
export interface GridController {
readonly grid: Grid;
setTheme(theme: Partial<Theme> | undefined): void;
setReadOnly(readOnly: boolean): void;
setConfig(config: GridConfig | undefined): void;
setOverscan(overscan: number | undefined): void;
setMinColumns(minColumns: number | undefined): void;
destroy(): void;
}