Skip to main content

ViewToken 对象类型

ViewToken 对象作为 onViewableItemsChanged 回调中的属性之一返回,例如在 FlatList 组件中。由 ViewabilityHelper.js 导出。

¥ViewToken object is returned as one of properties in the onViewableItemsChanged callback, for example in FlatList component. It is exported by ViewabilityHelper.js.

示例

¥Example

{
item: {key: "key-12"},
key: "key-12",
index: 11,
isViewable: true
}

键和值

¥Keys and values

index

分配给数据元素的唯一数字标识符。

¥Unique numeric identifier assigned to the data element.

类型可选的
number是的

isViewable

指定列表元素的至少一部分在视口中是否可见。

¥Specifies if at least some part of list element is visible in the viewport.

类型可选的
boolean

item

项目数据

¥Item data

类型可选的
any

key

分配给提取到顶层的数据元素的键标识符。

¥Key identifier assigned of the data element extracted to the top level.

类型可选的
string

section

SectionList 一起使用时的项目部分数据。

¥Item section data when used with SectionList.

类型可选的
any是的

使用者

¥Used by