From c278f044d660ceb16b3fcf2c94edff35704e2675 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 5 Aug 2022 14:12:57 +0200 Subject: [PATCH] fix node name --- .../editors/data-type/editor-data-type.element.ts | 11 +++++++++-- .../document-type/editor-document-type.element.ts | 5 ++++- .../editors/node/editor-node.element.ts | 15 ++++++++++++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/editor-data-type.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/editor-data-type.element.ts index 104e160edf..44ec6ec403 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/editor-data-type.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/editor-data-type.element.ts @@ -2,6 +2,7 @@ import { UUIButtonState, UUIInputElement, UUIInputEvent } from '@umbraco-ui/uui' import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { css, html, LitElement, nothing } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; +import { ifDefined } from 'lit-html/directives/if-defined.js'; import { Subscription, distinctUntilChanged } from 'rxjs'; import { UmbContextProviderMixin, UmbContextConsumerMixin } from '../../../core/context'; import { UmbNotificationService } from '../../../core/services/notification.service'; @@ -96,7 +97,10 @@ export class UmbEditorDataTypeElement extends UmbContextProviderMixin(UmbContext private _handleInput(event: UUIInputEvent) { if (event instanceof UUIInputEvent) { const target = event.composedPath()[0] as UUIInputElement; - this._dataTypeContext?.update({ name: target.value }); + + if (typeof target?.value === 'string') { + this._dataTypeContext?.update({ name: target.value }); + } } } @@ -110,7 +114,10 @@ export class UmbEditorDataTypeElement extends UmbContextProviderMixin(UmbContext return html` ${this._dataType ? html` - +
+
Breadcrumbs