moonstone/ Expandable List
Moonstone styled expandable list.
import ExpandableList from '@enact/moonstone/ExpandableList';Members
ExpandableListComponent
A component that renders a LabeledItem that can be expanded to show a selectable list of items.
By default, ExpandableList maintains the state of its selected property. Supply the
defaultSelected property to control its initial value. If you wish to directly control updates
to the component, supply a value to selected at creation time and update it in response to
onChange events.
ExpandableList maintains its open/closed state by default. The initial state can be supplied
using defaultOpen. In order to directly control the open/closed state, supply a value for
open at creation time and update its value in response to onClose/onOpen events.
import ExpandableList from '@enact/moonstone/ExpandableList';ExpandableListBaseComponent
A stateless component that renders a LabeledItem that can be expanded to show a selectable list of items.
import {ExpandableListBase} from '@enact/moonstone/ExpandableList';Properties
The items to be displayed in the list. This supports two data types. If an array of strings is provided, the strings will be used in the generated components as the readable text. If an array of objects is provided, each object will be spread onto the generated component with no interpretation. You'll be responsible for setting properties like
disabled,className, and setting the content usingchildren.NOTE: When providing an array of objects be sure a unique
keyis assigned to each item. Read about keys for more information.The primary text of the item.
When
trueandselectis not'multiple', the expandable will be closed when an item is selected.Disables voice control.
Disables ExpandableList and the control becomes non-interactive.
The secondary, or supportive text. Typically under the
title, a subtitle. If omitted, the label will be generated as a comma-separated list of the selected items.Default: nullKeeps the expandable open when the user navigates to the
titleof the component using 5-way controls and the user must select/tap the title to close the expandable.This does not affect
closeOnSelect.Default: falseAllows the user to move Spotlight past the bottom of the expandable (when open) using 5-way controls.
Default: falseText to display when no
labelis set.Called when the expandable is closing. Also called when selecting an item if
closeOnSelectistrue.Called when the expandable is opening.
Called when an item is selected.
Called when the component is removed while retaining focus.
Called prior to focus leaving the expandable when the 5-way left key is pressed.
Called prior to focus leaving the expandable when the 5-way right key is pressed.
Opens the expandable with its contents visible.
Selection mode for the list.
'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'Index or array of indices of the selected item(s).
Disables spotlight navigation into the component.
Default: false