React-native-swipe-list-view: Way to disable left or right swipe

Created on 2 Mar 2020  路  5Comments  路  Source: jemise111/react-native-swipe-list-view

Hello thanks for such an awesome library, my app supports the Arabic language which is RTL.
it would be easy for me if there is a way to disable left or right swipe respectively. when either right or left swipe is enabled I need to show delete button

I am looking for somthing similar to fowlling screenshots
when lyout is RTL
photo_2020-03-02_18-19-44

when lyout LTR
photo_2020-03-02_18-22-46

Most helpful comment

@NHuebner1983 Is that specific to RTL support?

There are props to disable a swipe direction such as disableRightSwipe | disableLeftSwipe. Does that solve your issue?

All 5 comments

Hey @ramisalem this isn't something currently supported out of the box but by changing the style for your delete button and changing things like rightOpenValue / leftOpenValue depending on if RTL is enabled or not this is definitely achievable

@jemise111 first off, this is the only swipe system we can get working with Expo - so grats to you on making this possible!

I am also looking to completely disable a drag direction.

@NHuebner1983 Is that specific to RTL support?

There are props to disable a swipe direction such as disableRightSwipe | disableLeftSwipe. Does that solve your issue?

That totally did the trick, thank you!

<SwipeRow
                leftOpenValue={290}
                disableLeftSwipe={true}
            >

@NHuebner1983 Excellent!

Was this page helpful?
0 / 5 - 0 ratings