Skip to content

Add onStartSwipe, onSwipeMove and onEndSwipe event handlers #77

@derUli

Description

@derUli

Is your feature request related to a problem? Please describe.
I have to use react-swipeable-list in combination with the react-sortable-hoc node module.
Horizontally swipes are implemented with this module and the sorting is implemented with react-sortable-hoc.
My issue is, that if I swipe horizontally it also causes the sorting of the react-sortable-hoc component to start dragging at the same time.
My idea to fix this is to give the react-sortable-hoc component an higher drag delay than react-swipable list and to use it's shouldCancelStart callback, to disable its sorting while the user is swiping left or right.

Describe the solution you'd like
To detect if a swipe is in progress I need an onStartSwipe event, which is called if the user clicks / touches this component and moves his cursor horizontally and an onEndSwipe event which is called when the user aborts the swipe gesture or finishes it.
I need also the possibility to check how much percentage of an item is colored while the user does a swipe gesture, something like an "on move while mouse down".

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions