React-native-swipe-list-view: Question: how to render the hidden row based on the swipe position?

Created on 21 Sep 2017  路  4Comments  路  Source: jemise111/react-native-swipe-list-view

I want to achieve Google Inbox's swipe experience, where the hidden row animates based on the swipe open position. Is this possible with the react-native-swipe-list-view?
Google Inbox

Most helpful comment

@grigy took a while but this is finally supported! See here:

https://github.com/jemise111/react-native-swipe-list-view#ui-based-on-swipe-values-the-gmail-effect

All 4 comments

Hi everyone!

I'm trying to add a feature to let the hidden row component know the swipe position. Then I can use that to animate the icon, like the Google Inbox.

So what would be the best way to pass the _translateX value of the SwipeRow to its child component hiddren row?

Hey @grigy this currently isn't supported but could be achieved by passing the value of how much a row has been swiped as it is being opened / closed. Maybe you could pass the value to a callback here: https://github.com/jemise111/react-native-swipe-list-view/blob/master/components/SwipeRow.js#L134

Not sure what kind of impact this would have on performance though...

Give it a shot and I'd be happy to look at a PR, thanks!

@grigy took a while but this is finally supported! See here:

https://github.com/jemise111/react-native-swipe-list-view#ui-based-on-swipe-values-the-gmail-effect

Thank you @jemise111. This is great!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bohdan145 picture bohdan145  路  6Comments

nzrin picture nzrin  路  5Comments

kyangy picture kyangy  路  3Comments

2JJ1 picture 2JJ1  路  5Comments

ramisalem picture ramisalem  路  5Comments