Remove yaml-change event on init

This commit is contained in:
Bram Kragten 2019-01-30 21:09:38 +01:00
parent db92abad66
commit c7d1417f48
2 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,6 @@ export class HuiYamlEditor extends HTMLElement {
},
},
});
fireEvent(this, "yaml-changed", { value: this._value });
this.codemirror.on("changes", () => this._onChange());
} else {
this.codemirror.refresh();

View File

@ -357,6 +357,7 @@ export class HuiEditCard extends LitElement {
configElement = await elClass.getConfigElement();
} else {
this._configValue = { format: "yaml", value: yaml.safeDump(conf) };
this._updatePreview(conf);
this._uiEditor = false;
this._configElement = null;
return false;
@ -373,6 +374,7 @@ export class HuiEditCard extends LitElement {
format: "yaml",
value: yaml.safeDump(conf),
};
this._updatePreview(conf);
this._uiEditor = false;
this._configElement = null;
return false;