ui/Repeater

Exports the ui/Repeater.Repeater component.

import Repeater from '@enact/ui/Repeater';

Members

RepeaterComponent

ui/Repeater.Repeater is a stateless component that stamps out copies of childComponent

import Repeater from '@enact/ui/Repeater';
Properties
childComponent
Element

Component type to repeat. This can be a React component or a string describing a DOM node (e.g. 'div')

childProp
String

The property on each childComponent that receives the data in children

Default: 'children'
children
Array

An array of data to be mapped onto the childComponent. For example, an array of strings. This supports two data types. If an array of strings is provided, the strings will be used in the generated childComponent as the readable text. If an array of objects is provided, each object will be spread onto the generated childComponent with no interpretation. You'll be responsible for setting properties like disabled, className, and setting the text content using the children key.

indexProp
String

The property on each childComponent that receives the index of the item in the Repeater

Default: 'data-index'
itemProps
Object

An object containing properties to be passed to each child.

ArrayBooleanFunctionModuleNumberObjectString