transformDataTableItems
DataTable
stable
Map an array of raw data objects to normalised IDataTableItem rows by calling transformDataTableItem for each entry. Returns an empty array when items is undefined.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- propsrequiredOmit<IDataTableItemsProps, 'items'>
- The DataTable props driving value/key/selectable resolution (same as transformDataTableItem).
- itemsrequiredArray<any> | undefined
- Raw data rows to normalise. Passing `undefined` returns an empty array without throwing.
- columnsrequiredArray<IInternalDataTableHeader>
- Resolved column descriptors forwarded to transformDataTableItem for per-column value extraction.
API
Return value
The value returned by this util.
- A new array of normalised rows. The length matches the input when items is defined; empty array otherwise.
Usage
Examples
Ready-to-paste usage snippets.
Normalise all rows of a table