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
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- propsrequiredIItemProps & { itemType?: string }
- The list props controlling field extraction. The optional `itemType` is forwarded but currently unused by transformListItem itself.
- itemsrequiredArray<(string | object)>
- Raw items to normalise. Each entry is passed to transformListItem.
API
Return value
The value returned by this util.
- An array of normalised list items with the same length as the input.
Usage
Examples
Ready-to-paste usage snippets.
Build a OrigamList-ready item array