-
I initialized OverlayScrollbars on But I also need to add a callback which should be dispatched after OverlayScrollbars scrolls the page to the top. The documentation severely lacks information in this respect. I saw this code in the documentation:
Then I wrote this in my code:
After I scrolled my page, nothing happens. Not even an error. Also, the browser demo uses TyepScript. However, not everyone uses TypeScript. Such a demo is not helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@ianthedev thanks for the feedback! Your example code should work, I've created an example for you: https://stackblitz.com/edit/vitejs-vite-vvnfw1?file=main.js&terminal=dev I also want to point out that the
I'll add an dedicated section for this topic into the FAQ section in the docs. |
Beta Was this translation helpful? Give feedback.
@ianthedev thanks for the feedback!
Your example code should work, I've created an example for you: https://stackblitz.com/edit/vitejs-vite-vvnfw1?file=main.js&terminal=dev
I also want to point out that the
scroll
event is just directly forwarded from the native scroll event. If you want to register you own scroll events or any other scroll related listeners you can do it like this:I'll add an dedicated section for this topic into the FAQ section in the docs.