-
|
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
OverlayScrollbarsinitializes. At the same time you are using thedefer: trueoption which defers the initialization to a point in time where the browser is idle. The flickering you're seeing is the time between theVirtualListandOverlayScrollbarsinitialization.You can solve this in two ways:
defer: trueand keep your code like you have it now: https://codesandbox.io/p/devbox/eager-joji-g7w8zn?workspaceId=b640333a-16e9-425d-8bf5-8042416c19c4defer: trueand scroll as soon as theVirtualListinitializes and whenOverlayScrollbarsinitializes: https://codesandbox.io/p/devbox/tender-lewin-mlw7yv