KingSora / OverlayScrollbars

A javascript scrollbar plugin that hides the native scrollbars, provides custom styleable overlay scrollbars, and preserves the native functionality and feel.
https://kingsora.github.io/OverlayScrollbars
MIT License
3.87k stars 214 forks source link

fix(os-ngx): re-enter Angular zone when dispatching events #516

Closed arturovt closed 1 year ago

arturovt commented 1 year ago

Currently event listeners are called outside of the Angular zone forcing the template to NOT being updated when any event is dispatched:

<overlay-scrollbars (osInitialized)="onInitialized()"></overlay-scrollbars>
onInitialized(): void {
  console.log(Zone.current); // <root>
}
KingSora commented 1 year ago

I'll release it with the new overlayscrollbars-ngx version as soon as I have time :)