Skip to content
New issue

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

can not pull down when FlatList/ScrollView is scrollable #1

Open
pasicopan opened this issue Aug 7, 2019 · 8 comments
Open

can not pull down when FlatList/ScrollView is scrollable #1

pasicopan opened this issue Aug 7, 2019 · 8 comments

Comments

@pasicopan
Copy link

pasicopan commented Aug 7, 2019

question

  • can not pull down when FlatList/ScrollView is scrollable.
  • It is ok when FlatList/ScrollView is not scrollable such as with little content inside
  • It is sometimes ok when I pull down after press a long time, about 5 seconds.
<PullToRefresh
    style={{ flex: 1, backgroundColor: 'red' }}
>
    <FlatList
        style={{ flex: 1 }}
        scrollEventThrottle={20}
    />
</PullToRefresh>
// or
<PullToRefresh
    style={{ flex: 1, backgroundColor: 'red' }}
>
    <ScrollView
        style={{ flex: 1 }}
        scrollEventThrottle={20}
    />
</PullToRefresh>

react:

  • "react": "16.8.6",
  • "react-native": "0.60.4",

os:

  • windows 10, android

simulator:

  • Nexus_6_API_22
  • Pixel_3_API_26
@sophister
Copy link
Owner

@pasicopan can you provide a Expo demo, so I can take a look? thx

@liubingbing
Copy link

liubingbing commented Sep 18, 2019

安卓上面,使用FlatList/ScrollView 时候。下拉刷新不灵敏,必须长按页面才能下拉刷新。滑动的时候触发不了下拉刷新View,Expo demo 版本2.12.2

@sophister
Copy link
Owner

@liubingbing 嗯,如果是从滚动区域下面开始往顶部滚动,在滚动到顶部的时候,不能 触发下拉动作,因为这时候外面的 View 没有捕获到手势,被内部的滚动组件捕获了。

另外那个下拉不灵敏,必须要长按才能触发,我好像没有遇到。如果内部的滚动组件没有处于最顶部的位置,那就不能触发外部的滚动手势

@liubingbing
Copy link

如果是从滚动区域下面开始往顶部滚动,在滚动到顶部的时候,不能 触发下拉动作,因为这时候外面的 View 没有捕获到手势,被内部的滚动组件捕获了。这种情况安卓,有办法解决?

@sophister
Copy link
Owner

@liubingbing 我这个实现,没有找到解决办法 😂

@sophister
Copy link
Owner

sophister commented Nov 6, 2019

latest version 1.0.3 should fix the scroll problem

@mtford90
Copy link

Just tried this on 1.0.3 and the issue still exists. If I scroll down the flatlist, and then scroll back up, can no longer pull to refresh.

However if I pull to refresh straight away, without scrolling, it works fine.

@sophister
Copy link
Owner

@mtford90 when you scroll down the flatlist, then scroll back up to top, you cannot trigger the pull to refresh without releasing your touch. You can only trigger pull to refresh with another touch action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants