transformListItems

List
stable

Map an array of raw items (strings or objects) to normalised IInternalListItemChildren by calling transformListItem for each entry. The main entry-point used by OrigamList and OrigamSelect.

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
IItemProps & { itemType?: string }
The list props controlling field extraction. The optional `itemType` is forwarded but currently unused by transformListItem itself.
items
requis
Array<(string | object)>
Raw items to normalise. Each entry is passed to transformListItem.

API

Valeur de retour

La valeur retournée par cet util.

An array of normalised list items with the same length as the input.

Usage

Exemples

Extraits de code prêts à coller.

Build a OrigamList-ready item array

typescript