We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1)属性名: onEndReachedThreshold 修改为 endReachedThreshold,表示加载更多的偏移值 2)表现对齐:
在对齐各端表现的前提下,onEndReached 在业务中一般用来做加载更多内容的功能,如果只判断滑到底部就触发onEndReached回调可能会造成短时间内多次获取更多内容的情况,因此删除 resetScroll,增加 resetEndReached,用于重置触底事件,若业务需要滚动到顶部,可调用scrollTo。
onEndReached
resetScroll
resetEndReached
scrollTo
function App() { function handleEndReached() { loadMorePromise().then(() => { // .... scrollView.resetEndReached(); }) } return ( <ScrollView ref={scrollView} onEndReached={handleEndReached} > //... </ScrollView> ); }
相关issue: #243 #383
weex 中 resetLoadmore 的讨论:alibaba/weex#1664 (comment)
The text was updated successfully, but these errors were encountered:
@fyangstudio @SoloJiang @ChrisCindy
Sorry, something went wrong.
这是打算 break change?另微信和支付宝小程序的表现建议都验证一下,保证体验一致
是啊
cryzzchen
No branches or pull requests
1)属性名: onEndReachedThreshold 修改为 endReachedThreshold,表示加载更多的偏移值
2)表现对齐:
在 Web 下,仅当 contentSize 发生变化时,滑动到底部才能触发 onEndReached 回调; 在小程序中,滑动到底部就能触发 onEndReached 回调;
在 Web、weex 和非微信小程序中,调用 resetScroll 时,不改变组件展示;在微信小程序中,会滚动到顶部;
在对齐各端表现的前提下,onEndReached 在业务中一般用来做加载更多内容的功能,如果只判断滑到底部就触发
onEndReached
回调可能会造成短时间内多次获取更多内容的情况,因此删除resetScroll
,增加resetEndReached
,用于重置触底事件,若业务需要滚动到顶部,可调用scrollTo
。当且仅当列表第一次或调用
resetEndReached
的第一次滚动到底部时,才触发onEndReached
.用于重置 endReached 状态。
相关issue:
#243
#383
weex 中 resetLoadmore 的讨论:alibaba/weex#1664 (comment)
The text was updated successfully, but these errors were encountered: