Code Monkey home page Code Monkey logo

Comments (9)

github-actions avatar github-actions commented on July 21, 2024

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

from primereact.

mamsellem avatar mamsellem commented on July 21, 2024

added demonstrator projet ( see in issue description "Reproducer")

from primereact.

melloware avatar melloware commented on July 21, 2024

@mamsellem PR is welcome if you have a recommended fix?

from primereact.

mamsellem avatar mamsellem commented on July 21, 2024

sure. I will submit a PR when possible

from primereact.

mamsellem avatar mamsellem commented on July 21, 2024

Hello I tried to submit a PR from my fork of primereact that it failed with error "you must be a contributor".
This is a screenshot of the submission screen
image

from primereact.

melloware avatar melloware commented on July 21, 2024

Weird I have never seen that before it should allow you to open a PR from a fork no problem?

from primereact.

melloware avatar melloware commented on July 21, 2024

@mamsellem i pushed PR if you want to review.

from primereact.

mamsellem avatar mamsellem commented on July 21, 2024

I don't think using deepequals is a good idea.
We are only interesteed in updating the bounds of the virtual scroller, so only the dimensions of the items matter, not the items themselves.

This was my fix for this issue:

line 570 of VirtualScroll.js

useUpdateEffect(() => {
  if (!prevProps.items || prevProps.items.length !== (props.items || []).length || (both && prevProps.items[0].length !== (props.items ? props.items[0].length : 0))) {
      init();
    }

What do you think ?

from primereact.

melloware avatar melloware commented on July 21, 2024

as mentioned props.items[0] feels hacky to check the first item of the array length.

from primereact.

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.