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

Make preventing the default touch event optional. #32

Merged
merged 4 commits into from
Apr 19, 2016
Merged

Make preventing the default touch event optional. #32

merged 4 commits into from
Apr 19, 2016

Conversation

sennett
Copy link
Contributor

@sennett sennett commented Apr 13, 2016

Adds a preventDefaultTouchMoveEvent prop to Swipeable that looks like this:

<Swipeable
    onSwiping={this.swiping}
    ...
    preventDefaultTouchMoveEvent={false}>
    <div>
        This element can be swiped
    </div>
</Swipeable>

The default is true to preserve default behaviour.

This PR supersedes PR #1 and resolves #28 and #21 (as long as the option is passed).

  • readme updated
  • examples updated.

Thanks.

@hartzis
Copy link
Collaborator

hartzis commented Apr 15, 2016

Thank you for this. I think we should be able to get this in.

I think I'm also going to get a PR in to update the cancelPageSwipe inside the touchMove to also add checks for onSwiped callbacks to solve for #21, specifically fruitkiwi's comment.

This was referenced Apr 15, 2016
@hartzis hartzis merged commit d5ae5d2 into FormidableLabs:master Apr 19, 2016
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

Successfully merging this pull request may close these issues.

cancel swipe depending on the return of onSwiping* callbacks
2 participants