From b6bf1b3a65dabac14228aaeac0fb6934fb6d2463 Mon Sep 17 00:00:00 2001 From: Lone Iversen <108085781+loivsen@users.noreply.github.com> Date: Mon, 26 Feb 2024 15:38:21 +0100 Subject: [PATCH] Feature: PropertyEditorUI TextBox Config Placeholder --- .../uis/text-box/property-editor-ui-text-box.element.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/text-box/property-editor-ui-text-box.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/text-box/property-editor-ui-text-box.element.ts index 0e290a7555..c219c566bb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/text-box/property-editor-ui-text-box.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/text-box/property-editor-ui-text-box.element.ts @@ -1,5 +1,5 @@ -import { css, html, customElement, property, state, ifDefined } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; +import { css, html, customElement, property, state, ifDefined } from '@umbraco-cms/backoffice/external/lit'; import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/extension-registry'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor'; @@ -23,11 +23,15 @@ export class UmbPropertyEditorUITextBoxElement extends UmbLitElement implements @state() private _maxChars?: number; + @state() + private _placeholder?: string; + @property({ attribute: false }) public set config(config: UmbPropertyEditorConfigCollection | undefined) { this._type = config?.getValueByAlias('inputType') ?? this.#defaultType; this._inputMode = config?.getValueByAlias('inputMode'); this._maxChars = config?.getValueByAlias('maxChars'); + this._placeholder = config?.getValueByAlias('placeholder'); } private onChange(e: Event) { @@ -41,6 +45,7 @@ export class UmbPropertyEditorUITextBoxElement extends UmbLitElement implements return html``;