Open ghost opened 6 years ago
I was able to implement a scroll bar. In my case:
<virtual-scroll class="gallery-container" ...
And the css:
.gallery-container {
...
overflow-y: scroll;
...
@include scrollBar;
}
And the scrollBar:
@mixin scrollBar {
&::-webkit-scrollbar-track {
box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
background-color: $gray-15;
}
&::-webkit-scrollbar {
width: 10px;
// background-color: #bbbbbb;
}
&::-webkit-scrollbar-thumb {
background-color: $gray-50;
}
}
Comment again if you have trouble.
@whyboris this is not cross browser
Me too doesn't work on iOS
If anyone is able to solve this, please submit a pull request & I'll look at it.
@inside-space This stackblitz appears to be a working solution with a different scrolling library at https://github.com/dhilt/ngx-ui-scroll and a scrollbar styling library at https://github.com/MurhafSousli/ngx-scrollbar
If someone is willing to convert this stackblitz into one which uses https://github.com/MurhafSousli/ngx-scrollbar and https://github.com/rintoj/angular2-virtual-scroll that would be ideal for testing/troubleshooting.
Afterwards, assuming the new stackblitz isn't working, if someone could code a fix & submit a pull request, that'd be even better!
I don't have time to code this feature, but I'm happy to accept a PR. I'll leave it open as an enhancement in case someone wants to pick it up. Thanks.
@rintoj Hello. You have a good library. I have a question: how to customize the vitrual scroll that like this. I need to apply cross browser styles for the scrollbar. Do you have ideas? Thanks for the answer.
Regards, Roman.