You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-5Lines changed: 31 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -63,18 +63,30 @@ NOTE: `SwipeableListItem` can be used without `SwipeableList` but swipe blocking
63
63
64
64
## SwipeableList Props
65
65
66
-
### scrollElement
66
+
### scrollStartThreshold
67
67
68
-
Type: `EventTarget`
68
+
Type: `number` (default: `10`)
69
69
70
-
Required to block swipe during scroll outside of the `SwipeableList` e.g. set to `window.document` to block swipes during body scroll.
70
+
How far (in pixels) scroll needs to be done to enable block list item swiping. When scrolling is started swiping cannot be done.
71
+
72
+
Can be set for whole list or for every item. See `scrollStartThreshold` for `SwipeableListItem`.
73
+
74
+
### swipeStartThreshold
75
+
76
+
Type: `number` (default: `10`)
77
+
78
+
How far (in pixels) swipe needs to be done to enable start swiping on list item. When swiping is started scrolling cannot be done.
79
+
80
+
Can be set for whole list or for every item. See `swipeStartThreshold` for `SwipeableListItem`.
71
81
72
82
### threshold
73
83
74
-
Type: `number`
84
+
Type: `number` (default: `0.5`)
75
85
76
86
How far swipe needs to be done to trigger attached action. `0.5` means that item needs to be swiped to half of its width, `0.25` - one-quarter of width.
77
87
88
+
Can be set for whole list or for every item. See `threshold` for `SwipeableListItem`.
89
+
78
90
## SwipeableListItem Props
79
91
80
92
### blockSwipe
@@ -102,6 +114,20 @@ Type: `Object`
102
114
103
115
Same as `swipeLeft` but to right. :wink:
104
116
117
+
### scrollStartThreshold
118
+
119
+
Type: `number` (default: `10`)
120
+
121
+
Can be set for whole list or for every item. See `scrollStartThreshold` for `SwipeableList`.
122
+
123
+
### swipeStartThreshold
124
+
125
+
Type: `number` (default: `10`)
126
+
127
+
How far swipe needs to be done to enable start swiping on list item. When swiping is started scrolling cannot be done.
128
+
129
+
Can be set for whole list or for every item. See `swipeStartThreshold` for `SwipeableList`.
130
+
105
131
### threshold
106
132
107
133
Type: `number` (default: `0.5`)
@@ -117,7 +143,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
0 commit comments