From c0d8ecbcc001c80fe0662f4e022fafc987a71dc1 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 9 Sep 2022 12:48:46 +0200 Subject: [PATCH] Update editor-entity-layout.element.ts --- .../editor-entity-layout/editor-entity-layout.element.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/editor-entity-layout/editor-entity-layout.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/editor-entity-layout/editor-entity-layout.element.ts index 0973719d8e..550627ead6 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/editor-entity-layout/editor-entity-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/editor-entity-layout/editor-entity-layout.element.ts @@ -3,11 +3,11 @@ import '../editor-layout/editor-layout.element'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { css, html, LitElement, nothing } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; -import { IRoute, IRoutingInfo, RouterSlot } from 'router-slot'; +import { IRoute, IRoutingInfo, PageComponent, RouterSlot } from 'router-slot'; import { map, Subscription } from 'rxjs'; import { UmbContextConsumerMixin } from '../../../../core/context'; -import { UmbExtensionRegistry } from '../../../../core/extension'; +import { createExtensionElement, UmbExtensionRegistry } from '../../../../core/extension'; import type { ManifestEditorView } from '../../../../core/models'; @customElement('umb-editor-entity-layout') @@ -117,8 +117,8 @@ export class UmbEditorEntityLayout extends UmbContextConsumerMixin(LitElement) { this._routes = this._editorViews.map((view) => { return { path: `view/${view.meta.pathname}`, - component: () => document.createElement(view.elementName || 'div'), - setup: (element: HTMLElement, info: IRoutingInfo) => { + component: () => createExtensionElement(view) as unknown as PageComponent, + setup: (_element: HTMLElement, info: IRoutingInfo) => { this._currentView = info.match.route.path; }, };