mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +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({ type: Boolean }) public readOnly = false;
|
||||
|
||||
@state() private _yaml = "";
|
||||
|
||||
public setValue(value): void {
|
||||
@ -61,6 +63,7 @@ export class HaYamlEditor extends LitElement {
|
||||
<ha-code-editor
|
||||
.hass=${this.hass}
|
||||
.value=${this._yaml}
|
||||
.readOnly=${this.readOnly}
|
||||
mode="yaml"
|
||||
autocomplete-entities
|
||||
.error=${this.isValid === false}
|
||||
|
Loading…
x
Reference in New Issue
Block a user