View as Markdown

API reference: @salmonui/data-grid/engine

StageContextinterface

import type { StageContext } from '@salmonui/data-grid/engine';
interface StageContext<Row, State> {
    readonly query: DataQuery;
    readonly columns: ColumnSnapshot<Row>;
    readonly state: State;
    readonly locale: string;
    readonly timeZone: string | undefined;
    readonly sourceIndexOf?: (rowId: RowId) => number;
    readonly sourceChange?: {
        readonly from: readonly Row[];
        readonly delta: RowDelta;
    } | null;
}
StageContext members (6)
NameSignatureDescription
queryreadonly query: DataQuery;
columnsreadonly columns: ColumnSnapshot<Row>;
statereadonly state: State;
localereadonly locale: string;
timeZonereadonly timeZone: string | undefined;

The grid timeZone option (undefined: the runtime's local zone).

sourceIndexOfoptionalreadonly sourceIndexOf?: (rowId: RowId) => number;

Source index of a row id through the engine id index, or -1.