Skip to content

Commit 4d039ac

Browse files
authored
Update disable swipe prop to be more consistent with directions (#668)
1 parent 39966fd commit 4d039ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/components/SwipeableItem/SwipeableItem.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ const SwipeableItem: React.FC<React.PropsWithChildren<Props>> = ({
8383
stopLeftSwipe,
8484
stopRightSwipe,
8585
friction = 20,
86+
disableLeftSwipe,
87+
disableRightSwipe,
8688
...rest
8789
}) => {
8890
const instanceOfSwipeableItemButtonProps = (
@@ -242,6 +244,8 @@ const SwipeableItem: React.FC<React.PropsWithChildren<Props>> = ({
242244
swipeGestureEnded={onStopSwiping}
243245
closeOnRowPress={closeOnPress}
244246
friction={friction}
247+
disableLeftSwipe={disableRightSwipe}
248+
disableRightSwipe={disableLeftSwipe}
245249
{...rest}
246250
>
247251
<View style={styles.behindContainer}>

0 commit comments

Comments
 (0)