From f568f659ae6c9d3fe28d75d08e77a12c9d626dee Mon Sep 17 00:00:00 2001 From: Julia Gru <56249914+julczka@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:31:01 +0200 Subject: [PATCH] add name argument --- .../workspace/partial-views-workspace.context.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-views-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-views-workspace.context.ts index 6f0ad7cc15..c06fd4346e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-views-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-views-workspace.context.ts @@ -5,10 +5,7 @@ import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api import { UmbWorkspaceContext } from '@umbraco-cms/backoffice/workspace'; import { loadCodeEditor } from '@umbraco-cms/backoffice/code-editor'; -export class UmbPartialViewsWorkspaceContext extends UmbWorkspaceContext< - UmbPartialViewsRepository, - PartialViewDetails -> { +export class UmbPartialViewsWorkspaceContext extends UmbWorkspaceContext { getEntityId(): string | undefined { throw new Error('Method not implemented.'); } @@ -64,8 +61,8 @@ export class UmbPartialViewsWorkspaceContext extends UmbWorkspaceContext< } } - async create(parentKey: string | null) { - const { data } = await this.repository.createScaffold(parentKey); + async create(parentKey: string | null, name = 'empty') { + const { data } = await this.repository.createScaffold(parentKey, name); if (!data) return; this.setIsNew(true); this.#data.next(data);