跳至主要內容

ViewToken 物件類型

ViewToken 物件會作為 onViewableItemsChanged 回呼函式中的其中一個屬性回傳 (例如,在 FlatList 組件中)。它由 ViewabilityHelper.js 匯出。

範例

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

鍵與值

index

指派給資料元素的唯一數字識別碼。

類型選填
number

isViewable

指定清單元素是否至少有一部分在視口中可見。

類型選填
boolean

item

項目資料

類型選填
any

key

指派給資料元素的鍵識別碼,已提取到頂層。

類型選填
string

section

SectionList 一起使用時的項目區段資料。

類型選填
any

用於