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

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

props
requis
Omit<IDataTableItemsProps, 'items'>
The DataTable props driving value/key/selectable resolution (same as transformDataTableItem).
items
requis
Array<any> | undefined
Raw data rows to normalise. Passing `undefined` returns an empty array without throwing.
columns
requis
Array<IInternalDataTableHeader>
Resolved column descriptors forwarded to transformDataTableItem for per-column value extraction.

API

Valeur de retour

La valeur retournée par cet util.

A new array of normalised rows. The length matches the input when items is defined; empty array otherwise.

Usage

Exemples

Extraits de code prêts à coller.

Normalise all rows of a table

typescript