Interface: DataSource\<TRow\>
Defined in: src/data/data-source.ts:21
Abstraction over the grid’s data backend.
M1 ships InMemoryDataSource (synchronous, client-side).
M4 adds optional methods for server-side operations — lazy loading,
pagination, live updates, where-used, and export-all.
The grid feature-detects capabilities via capabilities() and adapts
its behavior accordingly. Implementations only need to provide the
methods they support.
Type Parameters
TRow
TRow
Methods
capabilities()?
optionalcapabilities():DataSourceCapabilities
Defined in: src/data/data-source.ts:50
Optional. Declares which server-side capabilities are supported. The grid calls this at mount to determine behavior.
Returns
exportAll()?
optionalexportAll(query?):Promise<TRow[]>
Defined in: src/data/data-source.ts:56
Optional. Export all data bypassing pagination. Used by the export feature when scope is ‘all’.
Parameters
query?
Returns
Promise<TRow[]>
load()
load(
query?):TRow[] |Promise<TRow[]>
Defined in: src/data/data-source.ts:26
Returns rows. Accepts an optional query for server-side sort/filter. Synchronous for in-memory; async for server-side sources.
Parameters
query?
Returns
TRow[] | Promise<TRow[]>
loadChildren()?
optionalloadChildren(parentId,query?):Promise<TRow[]>
Defined in: src/data/data-source.ts:32
Optional. Load children of a specific node (lazy tree). Called when a user expands a node whose children haven’t been loaded.
Parameters
parentId
string
query?
Returns
Promise<TRow[]>
loadPage()?
optionalloadPage(params):Promise<PageResult<TRow>>
Defined in: src/data/data-source.ts:38
Optional. Load a page of flat data. Used when pagination is enabled.
Parameters
params
Returns
Promise<PageResult<TRow>>
subscribe()?
optionalsubscribe(onChange): () =>void
Defined in: src/data/data-source.ts:44
Optional. Subscribe to live data changes. Returns an unsubscribe function.
Parameters
onChange
DataChangeHandler<TRow>
Returns
() => void
whereUsed()?
optionalwhereUsed(nodeId):Promise<WhereUsedResult<TRow>[]>
Defined in: src/data/data-source.ts:62
Optional. Where-used / reverse BOM lookup. Given a node id, returns all parent assemblies that use it.
Parameters
nodeId
string
Returns
Promise<WhereUsedResult<TRow>[]>