API reference: @salmonui/data-grid/engine
PipelineStageinterface
import type { PipelineStage } from '@salmonui/data-grid/engine';interface PipelineStage<Row, State = unknown> {
readonly name: PipelineStageName;
key(query: DataQuery, state: State): readonly unknown[];
run(input: RowModelSnapshot<Row>, ctx: StageContext<Row, State>): RowModelSnapshot<Row>;
update?(input: RowModelSnapshot<Row>, previous: {
readonly input: RowModelSnapshot<Row>;
readonly output: RowModelSnapshot<Row>;
}, delta: RowDelta, ctx: StageContext<Row, State>): RowModelSnapshot<Row> | undefined;
}
| Name | Signature | Description |
|---|---|---|
name | readonly name: PipelineStageName; | |
key | key(query: DataQuery, state: State): readonly unknown[]; | Inputs besides the row model and compiled columns. The stage re-runs only
when the row model identity, the compiled leaf columns, or one of these
values (compared with |
run | run(input: RowModelSnapshot<Row>, ctx: StageContext<Row, State>): RowModelSnapshot<Row>; | Pure. Must not mutate |
updateoptional | update?(input: RowModelSnapshot<Row>, previous: {
readonly input: RowModelSnapshot<Row>;
readonly output: RowModelSnapshot<Row>;
}, delta: RowDelta, ctx: StageContext<Row, State>): RowModelSnapshot<Row> | undefined; | Optional incremental path. Called instead of |