diff --git a/docs/next/flatlist.html b/docs/next/flatlist.html index 295e9ff4429..9fa0afce026 100644 --- a/docs/next/flatlist.html +++ b/docs/next/flatlist.html @@ -439,6 +439,42 @@ class MultiSelectList extends React.PureComponent { ViewabilityConfigNo +

viewabilityConfig takes a type ViewabilityConfig an object with following properties

+ + + + + + + + + + +
PropertyRequiredType
minimumViewTimeNonumber
viewAreaCoveragePercentThresholdNonumber
itemVisiblePercentThresholdNonumber
waitForInteractionNoboolean
+

At least one of the viewAreaCoveragePercentThreshold or itemVisiblePercentThreshold is required. This needs to be done in the constructor to avoid following error (ref):

+
  Error: Changing viewabilityConfig on the fly is not supported`
+
+
constructor (props) {
+  super(props)
+
+  this.viewabilityConfig = {
+      waitForInteraction: true,
+      viewAreaCoveragePercentThreshold: 95
+  }
+}
+
+
<FlatList
+    viewabilityConfig={this.viewabilityConfig}
+  ...
+
+

minimumViewTime

+

Minimum amount of time (in milliseconds) that an item must be physically viewable before the viewability callback will be fired. A high number means that scrolling through content without stopping will not mark the content as viewable.

+

viewAreaCoveragePercentThreshold

+

Percent of viewport that must be covered for a partially occluded item to count as "viewable", 0-100. Fully visible items are always considered viewable. A value of 0 means that a single pixel in the viewport makes the item viewable, and a value of 100 means that an item must be either entirely visible or cover the entire viewport to count as viewable.

+

itemVisiblePercentThreshold

+

Similar to viewAreaPercentThreshold, but considers the percent of the item that is visible, rather than the fraction of the viewable area it covers.

+

waitForInteraction

+

Nothing is considered viewable until the user scrolls or recordInteraction is called after render.


viewabilityConfigCallbackPairs

List of ViewabilityConfig/onViewableItemsChanged pairs. A specific onViewableItemsChanged will be called when its corresponding ViewabilityConfig's conditions are met. See ViewabilityHelper.js for flow type and further documentation.