Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private _subscribeOnElementRemoval(element: Element): void {
events.off(element, DX_REMOVE_EVENT, this._onDxRemove);
events.one(element, DX_REMOVE_EVENT, this._onDxRemove);
}
getElementRef = ref => {
if (this.elementRef) {
events.off(this.elementRef, 'dxclick');
}
this.elementRef = ref;
events.on(this.elementRef, 'dxclick', e => {
this.props.openMenu(e);
});
};
ngOnDestroy() {
events.off(this.elementRef.nativeElement, 'dxclick');
}
}