[develop | DONE | FIXED]: showAuthors.component.ts: On destroy of component, delete all elements with "orcid-dropdown" class from "modal-container".
This commit is contained in:
parent
7a517e49ed
commit
632d11c82c
|
@ -170,6 +170,17 @@ export class ShowAuthorsComponent {
|
|||
|
||||
ngOnInit() {}
|
||||
|
||||
ngOnDestroy() {
|
||||
if(this.orcidDropdown && typeof document !== 'undefined') {
|
||||
let modal_container = document.getElementById("modal-container");
|
||||
modal_container.childNodes.forEach(c=> {
|
||||
if (c['className'] && c['className'].includes("orcid-dropdown")) {
|
||||
modal_container.removeChild(c);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public onClick() {
|
||||
if (this.modal) {
|
||||
this.modal.cancel();
|
||||
|
|
Loading…
Reference in New Issue