moonstone/ Virtual List
Provides Moonstone-themed virtual list components and behaviors.
import VirtualList from '@enact/moonstone/VirtualList';Members
VirtualListComponent
A Moonstone-styled scrollable and spottable virtual list component.
import VirtualList from '@enact/moonstone/VirtualList';Properties
Size of an item for the VirtualList; valid value is a number generally. For different item size, value is an object that has
minSizeandsizeas properties. If the direction for the list is vertical, itemSize means the height of an item. For horizontal, it means the width of an item.Usage:
<VirtualList itemSize={ri.scale(72)} />
VirtualGridListComponent
A Moonstone-styled scrollable and spottable virtual grid list component.
import {VirtualGridList} from '@enact/moonstone/VirtualList';Properties
VirtualListBaseComponent
A Moonstone-styled base component for VirtualList and VirtualGridList.
import {VirtualListBase} from '@enact/moonstone/VirtualList';Properties
The
renderfunction called for each item in the list.NOTE: The list does NOT always render a component whenever its render function is called due to performance optimization.
Usage:
renderItem = ({index, ...rest}) => { return ( <MyComponent index={index} {...rest} /> ); }Disable voice control feature of component.
Activates the component for voice control.
The voice control group label.
Size of the data.
Default: 0Allows 5-way navigation to the scrollbar controls. By default, 5-way will not move focus to the scrollbar controls.
Default: falseAllows 5-way navigation to the scrollbar controls. By default, 5-way will not move focus to the scrollbar controls.
Default: falseUnique identifier for the component.
When defined and when the
VirtualListis within a Panel, theVirtualListwill store its scroll position and restore that position when returning to thePanel.The ARIA role for the list.
Default: 'list'Sets the hint string read when focusing the next button in the vertical scroll bar.
Default: $L('scroll down')Sets the hint string read when focusing the previous button in the horizontal scroll bar.
Default: $L('scroll left')Sets the hint string read when focusing the next button in the horizontal scroll bar.
Default: $L('scroll right')Sets the hint string read when focusing the previous button in the vertical scroll bar.
Default: $L('scroll up')Spacing between items.
Default: 0When it's
trueand the spotlight focus cannot move to the given direction anymore by 5-way keys, a list is scrolled with an animation to the other side and the spotlight focus moves in wraparound manner.When it's
'noAnimation', the spotlight focus moves in wraparound manner as same as when it'strueexcept that a list is scrolled without an animation.Default: false