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)
- Drag the scrolllbar makes the grid blink in Firefox, but not in Chromium or Edge... HOT 1
- [BUG] react-beautiful-dnd + useWindowScroll HOT 1
- [BUG] followOutput doesn't scroll to bottom HOT 2
- [BUG] element disappearing when reverse scrolling in the ios HOT 4
- [BUG]After packaging a project that uses react-virtuoso, there is a problem embedding it into the iframe of another domain name HOT 2
- [BUG] `InitialTopMostItemIndex` causes variable height elements to blink/jump when scrolling up. HOT 2
- [BUG] Border does not get respected with fixed headers HOT 3
- Drag and drop not working as intended on mobile devices when using react-beautiful-dnd with react-virtuoso HOT 2
- [BUG] followOutput does not scroll al the way to bottom HOT 3
- [BUG] (virtuoso-message-list) strange scrolling on ipad HOT 2
- [BUG] Inability to use a flex container as a parent or to customize viewport
- [BUG] ScrollSeekPlaceholder in grouping mode create sticky placeholder item on the top of list HOT 2
- [BUG] restoreStateFrom never restoring correctly for VirtuosoGrid HOT 2
- [BUG] Excess re-render of TableVirtuoso items when props doesn't change HOT 4
- [BUG] huge delay when providing restoreStateFrom HOT 1
- [BUG] Content blinks on scroll upward HOT 2
- [BUG] VirtuosoGrid items is flickering while scrolling when they don't have same height
- [BUG] endless scroll not align while data loaded HOT 1
- [BUG] Height change of the item located at the top behind the viewport shifts content down
- Unable to use VirtuosoMessageList without license in dev for trial purpose HOT 1
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.