Git Product home page Git Product logo

Comments (8)

rskull avatar rskull commented on August 28, 2024 2

I got same issue.

Android
react-native-image-gallery v2.1.5
react-native 0.46.4

If you set initial page to more than 11 it always displays 10th picture, but v2.1.4 is working.

from react-native-image-gallery.

alainib avatar alainib commented on August 28, 2024 1

i still have this error, how to fix it please?

my version
react-native-image-gallery 2.1.5
react-native 0.51.0

thanks

from react-native-image-gallery.

jing-wu avatar jing-wu commented on August 28, 2024 1

Same issue.

Android Nexus 6P
react-native-image-gallery v2.1.5
react-native 0.52.0

Always displaying 10th image when it has more than 11 images.

v2.1.4 is working.
To switch to v2.1.4 from other version,you must use 'npm install [email protected] --save' instead of changing the version code in 'package.json' directly.

from react-native-image-gallery.

Exilz avatar Exilz commented on August 28, 2024

Hi,
I can't seem to reproduce this issue, do you have a simple sample of code so I can take a look at it ?

from react-native-image-gallery.

chrusart avatar chrusart commented on August 28, 2024

First of all I'm glad that someone took it over when maintainer stopped to support it.

Have the same, it all comes from ViewPager. When initialPage > initialListSize + 2 (10 seems to be default for ListView) it seems the last item is rendered from refs list. Refs list is created in Gallery::renderPage and it's easy to check that renderPage will be invoked 12 times (0..11 index) and if we add initialListSize prop for ListView in ViewPager class than it will be initialListSize + 2.

Thise issue is described here:
ldn0x7dc/react-native-view-pager#4

Sure you can set initialListSize in ViewPager but for large lists will not work.

There are other bugs as well that needs to be fixed or merged PRs.

I also will need to merge few fixes to ViewPager cause first crash on my list is caused by:
ldn0x7dc/react-native-view-pager#6

from react-native-image-gallery.

Exilz avatar Exilz commented on August 28, 2024

Hi @chrusart, thanks for the explanation on this problem.

I would need to take a deeper look to figure everything out, but it seems you've understood this issue already.

To be honest, I was planning on getting rid of the multiple dependencies to @ldn0x7dc packages, since he doesn't seem to be active on these repos either.

The best thing would be to copy each of their content and to provide them directly in react-native-image-gallery 's codebase. That way, we won't have to wait for him to merge these PRs.

If you're already familiar with react-native-view-pager 's code, I'd love you to make a PR on our repo with all you need to update from the dependency and add it as a file here. It will make future modifications much easier for us.

from react-native-image-gallery.

chrusart avatar chrusart commented on August 28, 2024

PR #13

from react-native-image-gallery.

Exilz avatar Exilz commented on August 28, 2024

Hi @KBepo, @chrusart 's PR fixed it nicely. Stay tuned for the release candidate of the next version of the module.

from react-native-image-gallery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.