以下是我的Flatlist
,
<FlatList
data={equipmentsList}
renderItem={({ item, index }) => this.renderEquipments(item, index)}
onScroll={(event) => this.handleScroll(event)}
/>
滚动到:
我试图通过使用ScrollTo来实现这一目标,如下所示,
scrollTo= {{x: 0, y: this.props.list.offsets, animated: true}}
但是它不起作用。
scrollToOffset:
this.Flatlist.scrollToOffset({
offset: this.props.list.offsets,
animated: true
});
这也不起作用。
有人可以让我知道如何通过任何一种方式来使其工作吗?谢谢!