对于scrollToIndex,如果我的元素在列表的底部,它会滚动到顶部,留出空白。有没有人要面对这个问题?

发布于 2019-02-08 23:19:41
您可以使用上面提到的一些扁平列表属性来实现您的目标。
[initialScrollIndex]https://facebook.github.io/react-native/docs/flatlist#initialscrollindex
[initialNumToRender]https://facebook.github.io/react-native/docs/flatlist#initialnumtorender
您还可以实现getItemLayout以提高性能,也可以使用https://facebook.github.io/react-native/docs/flatlist#getitemlayout
https://stackoverflow.com/questions/54592491
复制相似问题