API reference: @salmonui/data-grid/engine
LocalDataSourceinterface
import type { LocalDataSource } from '@salmonui/data-grid/engine';Also exported from @salmonui/data-grid.
interface LocalDataSource<Row> extends DataSource<Row> {
readonly mode: 'local';
getRows(): readonly Row[];
setRows(rows: readonly Row[]): void;
patch(patch: LocalDataPatch<Row>): void;
write(request: WriteRequest<Row>): Promise<WriteResult<Row>>;
subscribe(listener: (event: DataSourceEvent<Row>) => void): () => void;
}
| Name | Signature | Description |
|---|---|---|
mode | readonly mode: 'local'; | |
getRows | getRows(): readonly Row[]; | |
setRows | setRows(rows: readonly Row[]): void; | |
patch | patch(patch: LocalDataPatch<Row>): void; | |
write | write(request: WriteRequest<Row>): Promise<WriteResult<Row>>; | |
subscribe | subscribe(listener: (event: DataSourceEvent<Row>) => void): () => void; | |
readinherited | read: (request: DataSourceRequest) => DataSourceResult<Row> | Promise<DataSourceResult<Row>>; | |
invalidateoptionalinherited | invalidate?: ((scope?: "all" | "counts" | "facets" | "rows" | undefined) => void); | Drops cached results; |
capabilitiesoptionalinherited | capabilities?: Partial<DataSourceCapabilities>; |