chore(communication-recipients): mutation observer is managed via eventManager
This commit is contained in:
parent
34b4f48386
commit
5af045c11b
@ -29,8 +29,7 @@ export class CommunicationRecipients {
|
||||
|
||||
this.setupRecipientCategories();
|
||||
|
||||
const recipientObserver = new MutationObserver(this.setupRecipientCategories.bind(this));
|
||||
recipientObserver.observe(this.massInputElement, { childList: true });
|
||||
this._eventManager.registerNewMutationObserver(this.setupRecipientCategories.bind(this), this.massInputElement, { childList: true });
|
||||
}
|
||||
|
||||
setupRecipientCategories() {
|
||||
@ -46,6 +45,7 @@ export class CommunicationRecipients {
|
||||
|
||||
destroy() {
|
||||
this._eventManager.removeAllEventListenersFromUtil();
|
||||
this._eventManager.removeAllObserversFromUtil();
|
||||
this.removeCheckedCounter();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user