Skip to content

Commit b6da548

Browse files
committed
fix: align textbox with textarea in terms of naming
1 parent c01cb20 commit b6da548

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/packages/property-editors/text-box/property-editor-ui-text-box.element.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
2-
import {
3-
css,
4-
html,
5-
customElement,
6-
state,
7-
ifDefined,
8-
type PropertyValueMap,
9-
property,
10-
} from '@umbraco-cms/backoffice/external/lit';
2+
import { css, html, customElement, state, ifDefined, property } from '@umbraco-cms/backoffice/external/lit';
113
import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/extension-registry';
124
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
135
import {
@@ -54,12 +46,11 @@ export class UmbPropertyEditorUITextBoxElement
5446
this._placeholder = config?.getValueByAlias('placeholder');
5547
}
5648

57-
protected override firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
58-
super.firstUpdated(_changedProperties);
49+
protected override firstUpdated(): void {
5950
this.addFormControlElement(this.shadowRoot!.querySelector('uui-input')!);
6051
}
6152

62-
private onChange(e: Event) {
53+
#onInput(e: InputEvent) {
6354
const newValue = (e.target as HTMLInputElement).value;
6455
if (newValue === this.value) return;
6556
this.value = newValue;
@@ -73,7 +64,7 @@ export class UmbPropertyEditorUITextBoxElement
7364
placeholder=${ifDefined(this._placeholder)}
7465
inputMode=${ifDefined(this._inputMode)}
7566
maxlength=${ifDefined(this._maxChars)}
76-
@input=${this.onChange}
67+
@input=${this.#onInput}
7768
?readonly=${this.readonly}></uui-input>`;
7869
}
7970

0 commit comments

Comments
 (0)