input mode for property editor text box
This commit is contained in:
committed by
Jacob Overgaard
parent
83fed49f66
commit
84035d75b3
@@ -269,7 +269,7 @@ export const data: Array<DataTypeResponseModel | FolderTreeItemResponseModel> =
|
||||
propertyEditorUiAlias: 'Umb.PropertyEditorUi.Email',
|
||||
values: [
|
||||
{
|
||||
alias: 'inputType',
|
||||
alias: 'inputMode',
|
||||
value: 'email',
|
||||
},
|
||||
],
|
||||
|
||||
@@ -17,12 +17,16 @@ export class UmbPropertyEditorUITextBoxElement extends UmbLitElement implements
|
||||
@state()
|
||||
private _type: UuiInputTypeType = this.#defaultType;
|
||||
|
||||
@state()
|
||||
private _inputMode?: string;
|
||||
|
||||
@state()
|
||||
private _maxChars?: number;
|
||||
|
||||
@property({ attribute: false })
|
||||
public set config(config: UmbPropertyEditorConfigCollection | undefined) {
|
||||
this._type = config?.getValueByAlias<UuiInputTypeType>('inputType') ?? this.#defaultType;
|
||||
this._inputMode = config?.getValueByAlias('inputMode');
|
||||
this._maxChars = config?.getValueByAlias('maxChars');
|
||||
}
|
||||
|
||||
@@ -35,6 +39,7 @@ export class UmbPropertyEditorUITextBoxElement extends UmbLitElement implements
|
||||
return html`<uui-input
|
||||
.value=${this.value ?? ''}
|
||||
.type=${this._type}
|
||||
inputMode=${ifDefined(this._inputMode)}
|
||||
maxlength=${ifDefined(this._maxChars)}
|
||||
@change=${this.onChange}></uui-input>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user