-
Hello, I'm using virtual lists with OverlayScrollbars, but I noticed a problem. We can see that the content scrolls to the bottom after two frames, which makes the page flicker. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@A-kirami You are scrolling as soon as You can solve this in two ways:
|
Beta Was this translation helpful? Give feedback.
-
@A-kirami With a optimization I did in Notice how the |
Beta Was this translation helpful? Give feedback.
@A-kirami You are scrolling as soon as
OverlayScrollbars
initializes. At the same time you are using thedefer: true
option which defers the initialization to a point in time where the browser is idle. The flickering you're seeing is the time between theVirtualList
andOverlayScrollbars
initialization.You can solve this in two ways:
defer: true
and keep your code like you have it now: https://codesandbox.io/p/devbox/eager-joji-g7w8zn?workspaceId=b640333a-16e9-425d-8bf5-8042416c19c4defer: true
and scroll as soon as theVirtualList
initializes and whenOverlayScrollbars
initializes: https://codesandbox.io/p/devbox/tender-lewin-mlw7yv