dancormier / react-native-swipeout

iOS-style swipeout buttons behind component
MIT License
2.62k stars 645 forks source link

Detect scrolling view #159

Open mehulmpt opened 7 years ago

mehulmpt commented 7 years ago

Is there a way to detect which view I scrolled? I'm using this in a scrollview list and need to get which view I scrolled. Is there something i can do like:

<Swipeout right={swipeoutBtns} passDataToOnPress={e.id}> // where e.id is unique for this swpieout

and then

var swipeoutBtns = [{ text: 'Lock', onPress: (e) => { console.log(e); // logs 1234 (the id passed above) } }];

silentcloud commented 7 years ago

I think it is no need to pass params to onPress.

Please show your complete code.

CheragV commented 7 years ago

I think there is an onOpen function call prop which might help you @mehulmpt