Closed St1maSphere closed 4 years ago
Use ref
to get swipeable instance and then call close
on that to close.
For navigation use navigation lifecycle methods like onWillBlur
.
https://kmagiera.github.io/react-native-gesture-handler/docs/component-swipeable.html#close
@deepankarsandy Thank you for your answer But it will not work for me, cause of dinamic list of options and absence of reason to manage status of component using my state
Is it possible to, somehow, move this handling to 'list' level and make it stateful?
I think it can be something like this : https://github.com/facebook/react-native/blob/master/Libraries/Experimental/SwipeableRow/SwipeableFlatList.js
Did anyone solve this issue. Coz I'm stuck with this! @St1maSphere ?
@selcukoguz
Sorry for delay
For now, I am using an alternative solution: https://github.com/dancormier/react-native-swipeout
with param:
close={selectedId !== currentRow.id}
@St1maSphere thx for answer.
A good alternative is NativeBase
@St1maSphere Did you find a way?
All link given here are broken, I am currently testing https://github.com/jemise111/react-native-swipe-list-view but it is flaggy, is this doing better animation? (I ask because react-native-swipeout is the ancestor if react-native-swipe-list-view and I was going to try react-native-gesture-handler Swipeable component) Thanks and best!
This should be resolved by second comment.
Hi to everyone
Need to have ability to select only one Swipable component or close already swiped element on move through navigation, press outside element range, etc
Thanks in advance