-
Notifications
You must be signed in to change notification settings - Fork 149
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
cancel swipe depending on the return of onSwiping* callbacks #28
Comments
It's easy if (this.props.onSwipingDown) {
- this.props.onSwipingDown(e, pos.absY)
- cancelPageSwipe = true
+ cancelPageSwipe = this.props.onSwipingDown(e, pos.absY)
}
//...
- if (cancelPageSwipe) {
+ if (cancelPageSwipe === undefined || cancelPageSwipe) {
e.preventDefault()
} With this diff, no breaking change and you can control from onSwipingDown if you want to prevent default or not. |
Are you open for this (tiny but very cool) change? |
Personally I do think it is interesting and neat hack. Just wondering if it could be made more explicit because It also seems it would be a major version bump. Users could randomly be returning values from their callbacks of @goatslacker thoughts on this? |
The |
this seems very much related to a bigger issue with #21, and androids and old ios. any ideas? |
That might help me to implement a pull to refresh only when I am swiping at the top of my container. I would be able to detect if the container is at its top and return true/false if not which might trigger the scroll or not. Currently I use onSwipingDown but it's blocking the scroll up :)
The text was updated successfully, but these errors were encountered: