chore(communication-recipients): mutation observer is managed via eventManager

This commit is contained in:
Johannes Eder 2021-07-05 12:05:16 +02:00 committed by Sarah Vaupel
parent 34b4f48386
commit 5af045c11b

View File

@ -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();
}
}