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

PullView always triggered when user wants to scroll to the top in WebView #47

Open
natterstefan opened this issue Dec 15, 2017 · 0 comments

Comments

@natterstefan
Copy link

natterstefan commented Dec 15, 2017

Hi @greatbsky,

I have an important problems using your solution in my project. Let me try to explain it. I have the following render method:

<View style={styles.container}>
  <PullView style={{
      width: Dimensions.get('window').width
    }}
    refreshControl={
      <RefreshControl
        refreshing = {
          this.state.refreshing
        }
        onRefresh = {
         this.onPullRelease.bind(this)
        }
      />
     }
    >
    <WebView {...this.props}/>
  </PullView>
</View>

The following happens

  • when I scroll down, the RefreshControl is visible and starts loading
  • when I scroll up it does not appear
  • but, the user cannot scroll to the top of the Webview again without triggering the PullView again. Only when I scroll twice I am able to get to the top of the Webpage again.

Is there a way to tell the PullView to start pulling etc. only when a specific condition is met? Because then I can calculate the scroll position within the Webview, using the onMessage feature to get it and tell the PullView how to act then.

Can you help me out here please?

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

1 participant