@kanunilabs/datagrid-react / LoadResult
Interface: LoadResult<TRow>
Defined in: datagrid-core/dist/index.d.ts:942
Type Parameters
TRow
TRow = GridRowData
Properties
groups?
optionalgroups?:RemoteGroupRow[]
Defined in: datagrid-core/dist/index.d.ts:951
Group rows for this level. Present instead of rows when the request's
groupKeys is shorter than group, i.e. the level being asked for is a
grouping level rather than the leaf data.
rows
rows:
TRow[]
Defined in: datagrid-core/dist/index.d.ts:943
summaries?
optionalsummaries?:Record<string,number|null>
Defined in: datagrid-core/dist/index.d.ts:965
Footer totals over the whole filtered result, keyed by summaryKey() —
"revenue:sum", "id:count". Present when the request carried
summaries; the same shape a group row's aggregates uses, so a server
builds both the same way.
The grid pages through blocks, so these are a property of the QUERY rather
than of any one response: returning them on every block is fine (the last
one wins), and so is returning them only when skip === 0. What must not
happen is answering a filter with the previous filter's totals — the grid
drops what it holds the moment the query changes, precisely so a stale
number cannot sit under fresh rows.
totalCount
totalCount:
number
Defined in: datagrid-core/dist/index.d.ts:945
Children at the requested level — group rows OR data rows, never both.