mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 07:46:37 +00:00
Allow marking YAML editor as read only (#11960)
This commit is contained in:
parent
bd20c15a55
commit
ccb91e0b49
@ -31,6 +31,8 @@ export class HaYamlEditor extends LitElement {
|
|||||||
|
|
||||||
@property() public label?: string;
|
@property() public label?: string;
|
||||||
|
|
||||||
|
@property({ type: Boolean }) public readOnly = false;
|
||||||
|
|
||||||
@state() private _yaml = "";
|
@state() private _yaml = "";
|
||||||
|
|
||||||
public setValue(value): void {
|
public setValue(value): void {
|
||||||
@ -61,6 +63,7 @@ export class HaYamlEditor extends LitElement {
|
|||||||
<ha-code-editor
|
<ha-code-editor
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.value=${this._yaml}
|
.value=${this._yaml}
|
||||||
|
.readOnly=${this.readOnly}
|
||||||
mode="yaml"
|
mode="yaml"
|
||||||
autocomplete-entities
|
autocomplete-entities
|
||||||
.error=${this.isValid === false}
|
.error=${this.isValid === false}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user