react-native-swipeable icon indicating copy to clipboard operation
react-native-swipeable copied to clipboard

Order not persisted on list re-render

Open rcorrie opened this issue 7 years ago • 1 comments

I am using swipeable components in a SectionList that is subject to change often.

Here is the behavior I am experiencing:

If I were to have a list of 10 items, and I swipe open item number 3 in the list. Then while, item 3 is still open, I remove item number 1 from the list. I would expect item number 2 to be the one that is now opened. Instead, what I see is item number 3 (used to be item number 4) opened.

Is there any way to get around this? It seems like an issue with the way SectionList recycles views?

Here is a gif showing the issue. Notice how the swipeable component remains opened.

apr-03-2018 10-16-31

rcorrie avatar Apr 03 '18 14:04 rcorrie

This issue can be closed. This video does a good job at explaining how to manage this type of scenario with FlatList.

rcorrie avatar Apr 04 '18 22:04 rcorrie