enable and disable the sorter based on readonly state

This commit is contained in:
Mads Rasmussen
2024-08-20 12:59:50 +02:00
parent fe32ef093f
commit f4cb49c2b8

View File

@@ -119,7 +119,14 @@ export class UmbInputDocumentElement extends UmbFormControlMixin<string | undefi
* @default false
*/
@property({ type: Boolean, reflect: true })
readonly = false;
public get readonly() {
return this.#readonly;
}
public set readonly(value) {
this.#readonly = value;
this.#readonly ? this.#sorter.disable() : this.#sorter.enable();
}
#readonly = false;
@state()
private _editDocumentPath = '';