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
Component type to repeat. This can be a React component or a string describing a DOM node (e.g.
'div'
)- childProp
The property on each
childComponent
that receives the data inchildren
Default: 'children'- children
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 generatedchildComponent
as the readable text. If an array of objects is provided, each object will be spread onto the generatedchildComponent
with no interpretation. You'll be responsible for setting properties likedisabled
,className
, and setting the text content using thechildren
key.- indexProp
The property on each
childComponent
that receives the index of the item in the RepeaterDefault: 'data-index'- itemProps
An object containing properties to be passed to each child.