mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix cancel button in automation row alias rename dialog (#16810)
This commit is contained in:
parent
2767f866f3
commit
d7c3ff3e9d
@ -524,17 +524,19 @@ export default class HaAutomationActionRow extends LitElement {
|
||||
defaultValue: this.action.alias,
|
||||
confirmText: this.hass.localize("ui.common.submit"),
|
||||
});
|
||||
const value = { ...this.action };
|
||||
if (!alias) {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
}
|
||||
fireEvent(this, "value-changed", {
|
||||
value,
|
||||
});
|
||||
if (this._yamlMode) {
|
||||
this._yamlEditor?.setValue(value);
|
||||
if (alias !== null) {
|
||||
const value = { ...this.action };
|
||||
if (alias === "") {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
}
|
||||
fireEvent(this, "value-changed", {
|
||||
value,
|
||||
});
|
||||
if (this._yamlMode) {
|
||||
this._yamlEditor?.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,16 +471,17 @@ export default class HaAutomationConditionRow extends LitElement {
|
||||
defaultValue: this.condition.alias,
|
||||
confirmText: this.hass.localize("ui.common.submit"),
|
||||
});
|
||||
|
||||
const value = { ...this.condition };
|
||||
if (!alias) {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
if (alias !== null) {
|
||||
const value = { ...this.condition };
|
||||
if (alias === "") {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
}
|
||||
fireEvent(this, "value-changed", {
|
||||
value,
|
||||
});
|
||||
}
|
||||
fireEvent(this, "value-changed", {
|
||||
value,
|
||||
});
|
||||
}
|
||||
|
||||
public expand() {
|
||||
|
@ -581,17 +581,19 @@ export default class HaAutomationTriggerRow extends LitElement {
|
||||
confirmText: this.hass.localize("ui.common.submit"),
|
||||
});
|
||||
|
||||
const value = { ...this.trigger };
|
||||
if (!alias) {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
}
|
||||
fireEvent(this, "value-changed", {
|
||||
value,
|
||||
});
|
||||
if (this._yamlMode) {
|
||||
this._yamlEditor?.setValue(value);
|
||||
if (alias !== null) {
|
||||
const value = { ...this.trigger };
|
||||
if (alias === "") {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
}
|
||||
fireEvent(this, "value-changed", {
|
||||
value,
|
||||
});
|
||||
if (this._yamlMode) {
|
||||
this._yamlEditor?.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user