move element controller back to its position.

This commit is contained in:
Niels Lyngsø
2023-07-25 21:02:14 +02:00
parent 097d19c921
commit 68ae4e3176

View File

@@ -31,16 +31,6 @@ export class UmbSectionDefaultElement extends UmbLitElement implements UmbSectio
if (oldValue === value) return;
this._manifest = value;
// It was important to ensure that the UmbExtensionsElementController first got created a little later.
// TODO: this needs further investigation, to figure out why it happens.
// Note: It might be because we have no system for Context-APIs to inform when the leave the DOM. Done but...
// Note: I need to test if leaving the DOM actually works in this scenario:
if (!this._extensionController) {
this._extensionController = new UmbExtensionsElementController(this, 'sectionSidebarApp', null, (sidebarApps) => {
this._sidebarApps = sidebarApps;
this.requestUpdate('_sidebarApps');
});
}
this.requestUpdate('manifest', oldValue);
}
@@ -54,6 +44,12 @@ export class UmbSectionDefaultElement extends UmbLitElement implements UmbSectio
constructor() {
super();
this._extensionController = new UmbExtensionsElementController(this, 'sectionSidebarApp', null, (sidebarApps) => {
this._sidebarApps = sidebarApps;
this.requestUpdate('_sidebarApps');
});
this.#createRoutes();
}