react-native-image-gallery icon indicating copy to clipboard operation
react-native-image-gallery copied to clipboard

set initialPage

Open bobzhou666 opened this issue 7 years ago • 4 comments

when I set the initialPage,it will go wrong that show scrollToIndex out of range : undefined vs -1

bobzhou666 avatar Jan 08 '18 09:01 bobzhou666

You need to pass an integer to the initialPage prop , where that integer is the index of the image you want to display in the images prop array.

bahaeddine4 avatar Jan 09 '18 10:01 bahaeddine4

when i use this option with number > 12 Gallery freeze and not open the right element.

For example i have a list of 30 thumbnails, on click on thumbnail it open a Modal with Gallery , initalPage is set to the index of the clicked thumbnail. when index > 12 ( approximatly ) it dont work. it open a previous image and cannot zoom, cannot go to left and right. IF i close the modal and click a thumb with index < 12 it work

alainib avatar Jan 16 '18 09:01 alainib

@alainib what version are you using? Try using version 2.1.1 that I know used to work well. You might be interested in the discussion on issue #20 Edit: 2.1.4 should be quite OK as well. The braking changes were done in 2.1.5

vbuch avatar Jan 24 '18 16:01 vbuch

thanks vbuch. yes 2.1.4 work well, i fixed version to this ;)

alainib avatar Jan 25 '18 08:01 alainib