Skip to content

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

@natterstefan

Description

@natterstefan

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions