add readonly mode
This commit is contained in:
@@ -11,6 +11,15 @@ export class UmbPropertyEditorUITextareaElement extends UmbLitElement implements
|
||||
@property()
|
||||
value = '';
|
||||
|
||||
/**
|
||||
* Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content.
|
||||
* @type {boolean}
|
||||
* @attr
|
||||
* @default false
|
||||
*/
|
||||
@property({ type: Boolean, reflect: true })
|
||||
readonly = false;
|
||||
|
||||
@state()
|
||||
private _maxChars?: number;
|
||||
|
||||
@@ -52,7 +61,8 @@ export class UmbPropertyEditorUITextareaElement extends UmbLitElement implements
|
||||
.maxlength=${this._maxChars}
|
||||
.rows=${this._rows}
|
||||
.value=${this.value ?? ''}
|
||||
@input=${this.#onInput}></uui-textarea>
|
||||
@input=${this.#onInput}
|
||||
?readonly=${this.readonly}></uui-textarea>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user