Server grouping
GroupAggregation, GroupByColumn, GroupInfo, ServerGroupRow and 3 more: generated from the source of active-grid.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Functions, hooks and constants#
- Type
(row: unknown) => row is ServerGroup Row
Type guard: is this row a synthetic server group header?
- Type
(row: unknown) => row is ServerLoad More Row
Type guard: is this row a "load more" marker?
Types#
Aggregation to compute per group on the server.
The public ServerFetchParams.groupAggregations field accepts this shape. The grid does not populate that field. The resource or custom fetch adapter owns server aggregation and returns GroupInfo.aggregations. Client-side column.server markers do not execute a server query. See docs/guides/server-grouping.md for the current integration boundary.
interface GroupAggregation {
field: string;
func: 'sum' | 'avg' | 'count' | 'min' | 'max';
}Column to group by in server-side grouping.
interface GroupByColumn {
field: string;
sort?: 'asc' | 'desc';
}Metadata for a single group in a grouped response.
interface GroupInfo {
key: unknown;
count: number;
aggregations?: Record<string, number | string>;
hasSubGroups?: boolean;
}Synthetic row marker used to represent a server-side group header in the flat row list. The rendering layer recognizes __ and renders these as expandable group headers instead of regular data rows.
interface ServerGroupRow {
__isServerGroup: true;
__groupField: string;
__groupValue: unknown;
__groupCount: number;
__groupAggregations?: Record<string, number | string>;
__hasSubGroups?: boolean;
__groupKeys: unknown[];
__depth: number;
}Synthetic row marker for a "load more" button within a server-side group. Rendered as a clickable row that loads the next batch of items for that group.
interface ServerLoadMoreRow {
__isServerLoadMore: true;
__groupKeys: unknown[];
__loadedCount: number;
__totalCount: number;
__depth: number;
}