ui/ Group
Exports the ui/Group.Group and ui/Group.GroupItem components. The default export is ui/Group.Group.
import Group from '@enact/ui/Group';
Members
GroupComponent
ui/Group.Group supports selection of its child items via configurable properties and events.
import Group from '@enact/ui/Group';
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'- childSelect
The name of the event that triggers activation.
Default: 'onClick'- children
An array of data to be mapped onto the
childComponent
. For example, an array of strings.- indexProp
The property on each
childComponent
that receives the index of the itemDefault: 'data-index'- itemProps
An object containing properties to be passed to each child.
- onSelect
Callback method to be invoked when an item is activated.
- select
Selection mode for the group
single
- Allows for 0 or 1 item to be selected. The selected item may be deselected.radio
- Allows for 0 or 1 item to be selected. The selected item may only be deselected by selecting another item.multiple
- Allows 0 to n items to be selected. Each item may be selected or deselected.
Default: 'single'- selected
The index(es) of the currently activated item.
- selectedProp
The name of the DOM property that represents the selected state.
Default: 'data-selected'
GroupBaseComponent
ui/Group.GroupBase is a stateless component that supports selection of its child items via configurable properties and events.
import {GroupBase} from '@enact/ui/Group';