flattenItems
DataTable
stable
Flatten a DataTable item tree (rows + groups) according to the current open-group set, returning only the rows that should be visible at the current expansion state.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- itemsrequiredArray<(T | IDataTableGroup<T>)>
- The mixed array of leaf rows and group nodes to flatten.
- openedrequiredSet<string>
- Set of group IDs that are currently expanded. A group not in this set hides its children.
API
Return value
The value returned by this util.
- A flat array of visible items in the order they should be rendered by the DataTable.
Usage
Examples
Ready-to-paste usage snippets.
Flatten with one open group