到达顶部时加载更多 [英] Load more when the top is reached

查看:48
本文介绍了到达顶部时加载更多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我们可以在 onEndReached 时使用 load more 功能,同样的,当我们到达列表顶部时我们如何使用 load more 功能?同样,当我在顶部加载更多数据时执行此操作时,平面列表移动到最顶部元素,因此滚动变得无限.

As we can use load more functionality when onEndReached, the same way how can we use load more when we reach to the top of the list ? Also while doing this when I load more data at the top, Flat list moves to the very top element and hence scroll becomes infinite.

谢谢.

推荐答案

是的,我们可以在 React Native 0.60 及更高版本中实现这一点,因为在 Virtual 列表中进行了重大更改.仍然不包含适用于 Android 的解决方案.

Yes, we can achieve this in React native 0.60 and above, since the significant changes been made in the Virtual list. Still its doesn't contain the solution for Android.

这篇关于到达顶部时加载更多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆