Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
313 views
in Technique[技术] by (71.8m points)

SectionList 触发了 onScrollToIndexFailed 如何优化?

调用了 SectionListscrollToLocation 触发 onScrollToIndexFailed

查看文档:

https://reactnative.cn/docs/v...

用来处理滚动到尚未渲染的索引导致滚动失败时的回调。推荐的做法是自己计算偏移量,然后滚动到相应位置,或者滚动到更远的距离当更多的子元素已经渲染后再进行尝试。

可是 SectionList 并没有 scrollToIndex 方法啊,如何 滚动到相应位置??


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...