<List>
A virtualized List component for ReactLynx. Designed to render long lists of data.
Info
You can check the source code to understand how it works, and you're welcome to submit MRs to enhance its capabilities.
Basic Usage
ListProps
Properties
bouncesiOS
Enable iOS bounces effect.
childreniOSAndroidHarmony
Children of list.
classNameiOSAndroidHarmony
className
crossAxisGapiOSAndroidHarmony
Specifies the cross axis spacing between Component in the list.
enableScrolliOSAndroidHarmony
Enable vertical scroll.
enableScrollBariOSAndroidHarmony
Enable scrollBar.
enableScrollMonitoriOSAndroidHarmony
Enable scroll monitor.
exposureIDiOSAndroidHarmony
exposure-id for global exposure
exposureSceneiOSAndroidHarmony
exposure-scene for global exposure
initialScrollIndexiOSAndroidHarmony
The position to which the list automatically scrolls on the initial load.
iosEnableSimultaneousTouchiOS
Force touch event to send to List.
iosScrollsToTopiOS
Whether tapping the iOS status bar should scroll to top.
itemSnapiOSAndroidHarmony
Paginated scrolling effects
listIdiOSAndroidHarmony
The id of the list.
listMaxSizeiOSAndroidHarmony
Unit is px. Sets the auto-limiting size for the container. When child content size is below this value,the container size adjusts to fit content. When exceeded, the container locks at this size.
listTypeiOSAndroidHarmony
The layout type of list.
lowerThresholdItemCountiOSAndroidHarmony
Will override the lower-threshold. The item threshold from the lower edge of the list to trigger the onScrollToLower event.
main-thread:gestureiOSAndroid
If you want to use gesture, pass it here.
mainAxisGapiOSAndroidHarmony
Specifies the major axis spacing between Component in the list.
nameiOSAndroidHarmony
The name of list.
needLayoutCompleteInfoiOSAndroidHarmony
Output layout complete detailed info.
onUIAppeariOSAndroidHarmony
Exposure event for UI
onUIDisappeariOSAndroidHarmony
Disappear event for UI
preloadBufferCountiOSAndroidHarmony
Controls the number of nodes to be preloaded outside the on-screen nodes of the list. Not supported when listType is set to 'waterfall'.
ref
scrollEventThrottleiOSAndroidHarmony
The time interval, in milliseconds, for the list to trigger the scroll event callback.
scrollMonitorTagiOSAndroidHarmony
The tag for scroll monitor.
scrollOrientationiOSAndroidHarmony
Set to 'vertical' for vertical scrolling and set to 'horizontal' for horizontal scrolling.
scrollPropagationBehavioriOSAndroid
Controls whether scroll events propagate to parent containers. For now, 'preventPropagate' needs to be used together with temporaryBlockScrollClass and temporaryBlockScrollTag on iOS.
shouldRequestStateRestoreiOSAndroidHarmony
The lifecycle of element layer reuse. It solves the problem of reuse status disorder in the UI layer.
showVisibleItemInfoInScrollEventiOSAndroidHarmony
Controls whether the attachedCells information is included in the bindScroll event detail.
spanCountiOSAndroidHarmony
The span count of list.
stickyOffsetiOSAndroidHarmony
The offset of the sticky position from the top or bottom of the list.
styleiOSAndroidHarmony
style
temporaryAndroidEnableOverflowAndroid
Used to control whether platform list enable overflow property on Android platform.
temporaryBlockScrollClassiOS
The specific class name of the container that is blocked when 'scrollPropagationBehavior' is set to be 'preventPropagate', must be informed by the container provider. For now, 'preventPropagate' needs to be used together with temporaryBlockScrollClass and temporaryBlockScrollTag on iOS.
This is a temporary props and will be deprecated on new Lynx SDK version.
temporaryBlockScrollTagiOS
Used to specify the native container tag that is blocked when 'scrollPropagationBehavior' is set to be 'preventPropagate', corresponding to the Tag attribute of UIView. Needs to be specified by the native container provider. For now, 'preventPropagate' needs to be used together with temporaryBlockScrollClass and temporaryBlockScrollTag on iOS.
This is a temporary props and will be deprecated on new Lynx SDK version.
upperThresholdItemCountiOSAndroidHarmony
Will override the upper-threshold. The item threshold from the upper edge of the list to trigger the onScrollToUpper event.
useRefactorListiOSAndroidHarmony
Use refactored list.
Events
catchLongPressiOSAndroidHarmony
Same as onLongPress, but stops the event from propagating to parent elements.
catchTouchCanceliOSAndroidHarmony
Same as onTouchCancel, but stops the event from propagating to parent elements.
catchTouchEndiOSAndroidHarmony
Same as onTouchEnd, but stops the event from propagating to parent elements.
catchTouchMoveiOSAndroidHarmony
Same as onTouchMove, but stops the event from propagating to parent elements.
catchTouchStartiOSAndroidHarmony
Same as onTouchStart, but stops the event from propagating to parent elements.
debugLogLeveliOSAndroidHarmony
Display debug logs. 0: none, 1: error, 2: info, 3: verbose
onLayoutChangeiOSAndroidHarmony
Send when UI has changed viewport size.
onLayoutCompleteiOSAndroidHarmony
Send when list's items are updated and this update process has finished.
onLongPressiOSAndroidHarmony
Send when a touch-point is held on the UI for a period of time.
onScrolliOSAndroid
Being triggered when scrolling occurs.
onScrollEndiOSAndroid
Being triggered when scrolling stops.
onScrollStateChangeiOSAndroidHarmony
The scroll state change.
onScrollToLoweriOSAndroid
Being triggered when scrolling to lower.
onScrollToUpperiOSAndroid
Being triggered when scrolling to upper.
onSnapToItemiOSAndroidHarmony
Send when list snaps to an item.
onTapiOSAndroidHarmony
Send when a touch-point is tapped on the UI.
onTouchCanceliOSAndroidHarmony
Send when a touch event is interrupted or cancelled before it is completed.
onTouchEndiOSAndroidHarmony
Send when a touch-point is removed from the UI.
onTouchMoveiOSAndroidHarmony
Send when a touch-point is moving on the UI.
onTouchStartiOSAndroidHarmony
Send when a touch-point is placed on the UI.
diffResultDetails
insertions
move_from
move_to
removals
update_from
update_to
LayoutCompleteEvent
detailiOSAndroidHarmony
Layout details.
layoutCompleteEventDetail
diffResult
layout-idiOSAndroidHarmony
Connected to a setState.
visibleCellsAfterLayout
visibleCellsBeforeLayout
ListItemInfo
height
isBinding
itemKey
originX
originY
updated
width
ListItemSnapAlignment
factoriOSAndroidHarmony
Anchoring the position in pagination, with a value range of [0, 1].
0 - the scrolling List child node aligns with the top of the List.
1 - the scrolling List child node aligns with the bottom of the List.
offsetiOSAndroidHarmony
Add an additional offset parameter to apply an extra offset on top of the factor.
ListRef
autoScrolliOSAndroidHarmony
Scroll the list to the specified position and offset.
getVisibleCellsiOSAndroidHarmony
Scroll the list to the specified position and offset.
scrollIntoIDiOSAndroidHarmony
Extends standard list's scrollTo. This method uses worklet and supports parameter id like 'scrollIntoView' method for scroll-view. As list is lazy, index is necessary in this method to find where id's component located.
useRefactorList={true} is requiredscrollToiOSAndroidHarmony
Scroll the list to the specified position and offset.