ascoders / react-native-image-viewer

🚀 tiny & fast lib for react native image viewer pan and zoom
MIT License
2.44k stars 576 forks source link

ImageUrl Array doesn't appear to be updating when array is updated (ImageUrl array reduced or added) #443

Open mrshappy0 opened 3 years ago

mrshappy0 commented 3 years ago

I've noticed that when I remove a photo from the imageUrl array that the array updates showing the proper array with a reduced length but that somehow when swiping to the very end of the array it get's passed undefined returning the error: Cannot read property 'url' of undefined

It's not exactly clear where the renderItem isn't updating because the index and totalIndex seem to update properly.

xdarkleonx commented 3 years ago

I have same issue. Any ideas how to fix it?

Gfr1992 commented 3 years ago

I've noticed that when I remove a photo from the imageUrl array that the array updates showing the proper array with a reduced length but that somehow when swiping to the very end of the array it get's passed undefined returning the error: Cannot read property 'url' of undefined

It's not exactly clear where the renderItem isn't updating because the index and totalIndex seem to update properly.

Hi,

did you find any workaround?

Tnx