react-native-deck-swiper icon indicating copy to clipboard operation
react-native-deck-swiper copied to clipboard

Empty cards still tries to render ( From Previous Repo still issue )

Open doozie-akshay opened this issue 4 years ago • 2 comments

Card Index initializes with the maximum Card Index equal to the initial size of the cards Array. And if any element is deleted from cards Array or updated, it iterates over the same range of card indices, hence it will return undefined for items no longer present in Cards Array.

doozie-akshay avatar Aug 24 '20 15:08 doozie-akshay

Add 'key' prop to Swiper component

For example:

<Swiper key={cards.length}

davidn333 avatar Sep 13 '20 19:09 davidn333

I'm facing this exact issue, but the suggested fix makes the Swiper go back to the first card, any way to set the initial card index? Like if I want the swiper to render the first time starting from index 3?

gfpacheco avatar Nov 25 '20 23:11 gfpacheco