Skip to content
Sheetwrite

Sheetwrite / Documentation

GridControllerHandlers@sheetwrite/core/adapter

Event callbacks a host (a framework adapter, or any plain app) hangs off a grid's lifecycle.

Event callbacks a host (a framework adapter, or any plain app) hangs off a grid's lifecycle.

The controller reads these fields live on every event — see createGridController — so a host may swap any callback at any time by mutating the fields of the object it passed in, without recreating the grid. Every field is optional; a missing callback simply drops that event.

Members 7

onGridChange Forwarded from the grid's change event (a committed transaction).
onGridChange?(event: ChangeEvent): void;
onSelectionChange Forwarded from the grid's selection event; null when nothing is selected.
onSelectionChange?(selection: Selection | null): void;
onViewportChange Forwarded from the grid's scroll event.
onViewportChange?(event: GridEvents["scroll"]): void;
onEditBegin Forwarded when a cell editor opens.
onEditBegin?(event: GridEvents["edit-begin"]): void;
onEditCommit Forwarded after a cell editor commits.
onEditCommit?(event: GridEvents["edit-commit"]): void;
onActiveSheetChange Forwarded after the visible sheet changes.
onActiveSheetChange?(event: GridEvents["active-sheet"]): void;

Declaration

View full TypeScript declaration
export interface GridControllerHandlers {
onGridChange?(event: ChangeEvent): void;
onSelectionChange?(selection: Selection | null): void;
onViewportChange?(event: GridEvents["scroll"]): void;
onEditBegin?(event: GridEvents["edit-begin"]): void;
onEditCommit?(event: GridEvents["edit-commit"]): void;
onSearch?(result: GridEvents["search"]): void;
onActiveSheetChange?(event: GridEvents["active-sheet"]): void;
}