Closed Take-Limeship closed 10 months ago
Good day @Take-Limeship :)
I'll take a look as soon as I have time
@Take-Limeship You have to initialize the plugin outside of the ngZone
:
// from your example
this.ngZone.runOutsideAngular(() => {
OverlayScrollbars(
{
target: document.querySelector(
'scrollbartest-nx-welcome'
) as HTMLElement,
// target: document.body,
elements: {
// viewport: document.querySelector('#scroll') as HTMLElement,
},
},
this.defaultOptions
);
});
Here is a working example: https://stackblitz.com/edit/angular-ivy-4k2pe6?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts
That solved it, thank you very much! :)
Describe the bug In Angular when using OverlayScrollbars with a target to a component with a ngbDropdown the app freezes.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should be possible to initialize the OverlayScrollbars to a component containing a ngbDropdown without errors.
Additional context We also tried ignoring all mutations and upping the debounce timeout with no avail. Is there something we missed here? Thanks in advance!