Dear jqWidgets Team
The jqxGrid Angular component does not seem to clean up its event handlers completely. After navigating away from an Angular route containing a jqxGrid, there still seems to be an active ‘mousemove’ handler that keeps the ngZone from stabilizing.
Version: 5.4.0 – Commercially licensed edition
HTML:
<jqxGrid #gridReference></jqxGrid>
In my component:
@ViewChild('gridReference')
grid: jqxGridComponent;
ngOnDestroy(): void {
// The jqxGrid component does not seem to implement ngOnDestroy, therefore we do it ourselves
this.grid.destroy();
}
To see the problem, in the main component add:
constructor(zone: NgZone) {
zone.onStable.subscribe(() => {
console.log('Stable');
});
zone.onUnstable.subscribe(() => {
console.log('Unstable');
});
}
After visiting a page using the jqxGrid, ‘Unstable’ / ‘Stable’ is triggered on every mouse movement, which clearly indicates that the event handler is not unregistred.
How can I get the grid component to completely clean upon destruction?
Cheers
Christian