redirect controller for partial view

This commit is contained in:
Niels Lyngsø
2024-02-28 08:01:06 +01:00
parent b6c2137cbc
commit 5abf3d9041

View File

@@ -22,6 +22,12 @@ export class UmbPartialViewWorkspaceElement extends UmbLitElement {
const parentUnique = info.match.params.parentUnique === 'null' ? null : info.match.params.parentUnique;
const snippetId = info.match.params.snippetId;
await this.#onCreate(parentUnique, snippetId);
new UmbWorkspaceIsNewRedirectController(
this,
this.#workspaceContext,
this.shadowRoot!.querySelector('umb-router-slot')!,
);
},
},
{
@@ -30,6 +36,12 @@ export class UmbPartialViewWorkspaceElement extends UmbLitElement {
setup: async (component: PageComponent, info: IRoutingInfo) => {
const parentUnique = info.match.params.parentUnique === 'null' ? null : info.match.params.parentUnique;
await this.#onCreate(parentUnique);
new UmbWorkspaceIsNewRedirectController(
this,
this.#workspaceContext,
this.shadowRoot!.querySelector('umb-router-slot')!,
);
},
},
{