Giter VIP home page Giter VIP logo

Comments (5)

petyosi avatar petyosi commented on May 18, 2024 1

Hey,

just published v0.5.0 that provides access to the scroll container and allows you to swap it with a something like the custom scrollbars component. You can check the example and use it as a starting point for your implementation.

Let me know if the above works for you.

from react-virtuoso.

petyosi avatar petyosi commented on May 18, 2024

Thank you for the suggestion - this should be easy to do if the component exports render property that allows customization of the scrolling container. I will give this a shot.

from react-virtuoso.

petyosi avatar petyosi commented on May 18, 2024

@mcastro84 I managed to do the idea described above, will include it in the next release. Quick question - what are you trying to achieve? If you are trying to scroll to a given index or location, I plan to do that as part of the core API of the component.

from react-virtuoso.

rmccastro avatar rmccastro commented on May 18, 2024

Thanks for the quick reply petyosi.
Scrolling to a specific index would be great also but at the moment I'm just trying to scroll the list using the custom scrollbars instead of using the native scrollbar.
My approach to this was to get the ref of the list container (in this case ), get the scrollTop value every time the list is scrolled and then trigger the event scroll manually.

As an example, in the codesandbox code, I'm generating 100 items but when I scroll only 17 items show and that seems to be because Virtuoso isn't aware that the list is being scrolled.

Again, thanks for your help

from react-virtuoso.

rmccastro avatar rmccastro commented on May 18, 2024

Thank you petyosi, that should do the trick. I'll give it a try and get back to you.

from react-virtuoso.

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.