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
+33-7Lines changed: 33 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -63,25 +63,37 @@ 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 block swiping. After scrolling is started and goes beyond the threshold, swiping is blocked.
71
+
72
+
It can be set for the whole list or for every item. See `scrollStartThreshold` for `SwipeableListItem`. Value from the `SwipeableListItem` takes precedence.
73
+
74
+
### swipeStartThreshold
75
+
76
+
Type: `number` (default: `10`)
77
+
78
+
How far in pixels swipe needs to be done to start swiping on list item. After a swipe is started and goes beyond the threshold, scrolling is blocked.
79
+
80
+
It can be set for the whole list or for every item. See `swipeStartThreshold` for `SwipeableListItem`. Value from the `SwipeableListItem` takes precedence.
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
+
It can be set for the whole list or for every item. See `threshold` for `SwipeableListItem`. Value from the `SwipeableListItem` takes precedence.
89
+
78
90
## SwipeableListItem Props
79
91
80
92
### blockSwipe
81
93
82
94
Type: `boolean` (default: `false`)
83
95
84
-
If set to `true` all defined swipe actions are blocked. This is done by `SwipeableList` during scroll to prevent mouse move events to cause accidental swiping acitions.
96
+
If set to `true` all defined swipe actions are blocked.
85
97
86
98
### swipeLeft
87
99
@@ -102,11 +114,25 @@ 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
+
It can be set for the whole list or for every item. See `scrollStartThreshold` for `SwipeableList`. Value from the `SwipeableListItem` takes precedence.
122
+
123
+
### swipeStartThreshold
124
+
125
+
Type: `number` (default: `10`)
126
+
127
+
How far in pixels swipe needs to be done to start swiping on list item. After a swipe is started and goes beyond the threshold, scrolling is blocked.
128
+
129
+
It can be set for the whole list or for every item. See `swipeStartThreshold` for `SwipeableList`. Value from the `SwipeableListItem` takes precedence.
130
+
105
131
### threshold
106
132
107
133
Type: `number` (default: `0.5`)
108
134
109
-
Can be set for whole list or for every item. See `threshold` for `SwipeableList`.
135
+
It can be set for the whole list or for every item. See `threshold` for `SwipeableList`. Value from the `SwipeableListItem` takes precedence.
110
136
111
137
## Contributors ✨
112
138
@@ -117,7 +143,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
0 commit comments