Comments (5)
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.
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.
@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.
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.
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)
- Suggestion - add onScrollbarPresenceChange event/callback HOT 1
- [BUG] `TableBody` in components props of `TableVirtuoso` causes rendering issue HOT 1
- [TYPE ERROR]: GridItem is missing some prop types HOT 2
- [BUG] GridVirtuoso with material-ui grid
- [BUG] Prepending docs not there anymore HOT 1
- [BUG] Table scrolls to top when search params change HOT 1
- [BUG] Not unloading no longer visible items HOT 3
- EndReached is not called when the height of the container is greater than the total height of the loaded items
- [BUG] Zero-sized element, this should not happen HOT 3
- [BUG] Flickering of Dynamic Elements When Scrolling Up HOT 1
- Announcement:: Message List Component
- How do I customize/add style to the wrapper <DIV> for Header/Footer in react-virtuoso?
- [BUG] - Possible bug with GroupedVirtuoso initialTopMostItemIndex and resizing items HOT 1
- [BUG] Unable to scroll to absolute bottom if there is a footer with position: sticky HOT 9
- How to specify a row in Virtuoso List so that it does not unload when scrolling HOT 2
- [BUG] `restoreStateFrom` appears to have a race condition when restoring state on component mount HOT 8
- React Virtuoso Message List - ref.current.scrollToItem based on the item.data instead of using the item index?
- [BUG] npm run browse-examples
- [BUG] Simple header breaks restore state location HOT 2
- [BUG] When used in MUI's Tooltip component, extra white space will appear.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-virtuoso.