[BUG] Custom Scroller no longer works after upgrading to v2.3.2, main demo site example also appears broken
See original GitHub issueDescribe the bug List renders first page of items but fails to load more. See the example on virtuoso.dev site, here
Desktop (please complete the following information): MacBook Pro (13-inch, M1, 2020) MacOS Monterey 12.0.1 Chrome v97
Had to roll back my version to 2.3.1 to get it working again. Any idea what’s going on? Below is my implementation of custom scrollbars that work < v2.3.1.
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
const CustomScrollbars = React.forwardRef(({ children, style, ...props }, ref) => {
const refSetter = useCallback((scrollbarsRef) => {
if (scrollbarsRef) {
ref.current = scrollbarsRef.osInstance().getElements().viewport;
}
}, [ref]);
return (
<OverlayScrollbarsComponent
ref={refSetter}
options={{ overflowBehavior: { x: 'hidden' } }}
style={style}
{...props}
>
{children}
</OverlayScrollbarsComponent>
);
});
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Known Bugs and User Experience Issues - Elementor
Learn everything about Known Bugs and User Experience Issues in this article from Elementor's Knowledge Base. Get Elementor tips & more.
Read more >Known Bugs & Issues - Documentation - OceanWP
In this document we'll cover known bugs or user experience issues related to specific updates, as well as the current status (example: fixed ......
Read more >MainStage release notes - Apple Support
The main volume slider no longer reverts to its previous value if it is adjusted and then the background of the Channel Strips...
Read more >Bootstrap Modal Issue - Scrolling Gets Disabled - Stack Overflow
Bootstrap doesn't support multiple modals on the same page (At least until BS3). One way to make it work, is to use the...
Read more >Changelog - ACF
Changelog. Proudly improving Advanced Custom Fields since 1.0.0. 6.0.6. Release Date 13th December 2022.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes, that’s it. For anyone who stumbles upon this in the future, here’s what I did to fix the OverlayScrollbars component to get it working > v2.3.2 again.
Here’s the props that need to be injected post v2.3.2:
However, simply passing {…props} into the OverlayScrollbarsComponent does not work, as they end up injecting into the wrapper - not the internal scroll container itself. To fix, I looped the props passed from Virtuoso and injected them into the scroll element.
The above props get passed as attributes into the scroll container using the described method.
@maxhelsel Thanks so much for following up. Appreciate it.
I too am running nextjs and my code is similar to yours (exactly as the sandbox).Edit: Switched to using your code as GroupedVirtuoso wouldn’t take the scroller component. I’m using VirtuosoGrid, Virtuoso and GroupedVirtuoso in this app. 😄
I have noticed that if I update either dependencies
For now I’m content with running an older version. Once I finish the project I’m working on, then I’ll circle back and try to work out why later versions break.