add readonly prop to property editor ui

This commit is contained in:
Mads Rasmussen
2024-08-19 21:29:07 +02:00
parent 7133c913b0
commit d5bc8a218e

View File

@@ -15,6 +15,15 @@ export class UmbPropertyEditorUISliderElement extends UmbLitElement implements U
@property({ type: Object })
value: UmbSliderValue | undefined;
/**
* 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()
_enableRange = false;
@@ -82,7 +91,8 @@ export class UmbPropertyEditorUISliderElement extends UmbLitElement implements U
.min=${this._min}
.max=${this._max}
?enable-range=${this._enableRange}
@change=${this.#onChange}>
@change=${this.#onChange}
?readonly=${this.readonly}>
</umb-input-slider>
`;
}