Closed Ash66hub closed 1 year ago
At the moment there is no output or stream to notify you when it is hovered, but you can check if it is hovered through a reference to the scrollbar component and ngAfterViewChecked
@ViewChild(NgScrollbar): scrollbar: NgScrollbar;
ngAfterViewChecked() {
console.log(this.scrollbar.state.horizontalHovered, this.scrollbar.state.verticalHovered);
}
https://stackblitz.com/edit/ngx-scrollbar-edvd7l?file=src%2Fapp%2Fhome%2Fhome.component.ts
Works, thank you very much!!
What are you trying to do?
Trying to apply a set of style properties while the scrollbar is hovered (mouseenter)
What troubleshooting steps have you tried?
and using ngClass to apply the css class (using less css)
Environment