Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My page is using virtual scrolling, but it seems like the browser's native scrollbar is not being hidden. #526

Closed
coderwx1 opened this issue Apr 30, 2023 · 4 comments
Labels
🍌 question 💦 Virtualization Issue has a connection with a scroll virtualization library. vue Issue has a connection to the Vue framework.

Comments

@coderwx1
Copy link

Examples
Here's an example of my code,thx u
https://codesandbox.io/s/gracious-sea-2p8djp?file=/src/App.vue

@KingSora
Copy link
Owner

KingSora commented May 11, 2023

Good day @coderwx1

The problem here is that the RecycleScroller component is overwriting class names from the viewport element. Thus the correct stylings aren't applied.

You can just remove the part where you set the .scroller element as the viewport element and it should just work: https://codesandbox.io/s/headless-frog-43zm67?file=/src/App.vue

@KingSora KingSora added 🍌 question vue Issue has a connection to the Vue framework. labels May 11, 2023
@coderwx1
Copy link
Author

Good day @coderwx1

The problem here is that the RecycleScroller component is overwriting class names from the viewport element. Thus the correct stylings aren't applied.

You can just remove the part where you set the .scroller element as the viewport element and it should just work: https://codesandbox.io/s/headless-frog-43zm67?file=/src/App.vue

Thank you for your response. While this approach can indeed hide the native scrollbar. But,Due to the requirement of the virtual scrolling library, a size must be set for '.scroller'. However, after setting the size for '.scroller', the native scroll bar in the browser reappears. This is because the 'overflow-y: auto' CSS property for virtual scrolling overrides the OS CSS. Can you provide me some advice in this situation? Thank you。
image

@KingSora
Copy link
Owner

@coderwx1 v2.2.0 just released which should make your initial example work as well. Here is your initial example just with overlayscrollbars v2.2.0: https://codesandbox.io/s/nervous-ardinghelli-fgxqbh?file=/src/App.vue

@coderwx1
Copy link
Author

@coderwx1 v2.2.0 just released which should make your initial example work as well. Here is your initial example just with overlayscrollbars v2.2.0: https://codesandbox.io/s/nervous-ardinghelli-fgxqbh?file=/src/App.vue

Thank you. I have imported the latest released version and everything is working smoothly.

@KingSora KingSora added the 💦 Virtualization Issue has a connection with a scroll virtualization library. label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍌 question 💦 Virtualization Issue has a connection with a scroll virtualization library. vue Issue has a connection to the Vue framework.
Projects
None yet
Development

No branches or pull requests

2 participants