mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +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,
|
defaultValue: this.action.alias,
|
||||||
confirmText: this.hass.localize("ui.common.submit"),
|
confirmText: this.hass.localize("ui.common.submit"),
|
||||||
});
|
});
|
||||||
const value = { ...this.action };
|
if (alias !== null) {
|
||||||
if (!alias) {
|
const value = { ...this.action };
|
||||||
delete value.alias;
|
if (alias === "") {
|
||||||
} else {
|
delete value.alias;
|
||||||
value.alias = alias;
|
} else {
|
||||||
}
|
value.alias = alias;
|
||||||
fireEvent(this, "value-changed", {
|
}
|
||||||
value,
|
fireEvent(this, "value-changed", {
|
||||||
});
|
value,
|
||||||
if (this._yamlMode) {
|
});
|
||||||
this._yamlEditor?.setValue(value);
|
if (this._yamlMode) {
|
||||||
|
this._yamlEditor?.setValue(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,16 +471,17 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||||||
defaultValue: this.condition.alias,
|
defaultValue: this.condition.alias,
|
||||||
confirmText: this.hass.localize("ui.common.submit"),
|
confirmText: this.hass.localize("ui.common.submit"),
|
||||||
});
|
});
|
||||||
|
if (alias !== null) {
|
||||||
const value = { ...this.condition };
|
const value = { ...this.condition };
|
||||||
if (!alias) {
|
if (alias === "") {
|
||||||
delete value.alias;
|
delete value.alias;
|
||||||
} else {
|
} else {
|
||||||
value.alias = alias;
|
value.alias = alias;
|
||||||
|
}
|
||||||
|
fireEvent(this, "value-changed", {
|
||||||
|
value,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
fireEvent(this, "value-changed", {
|
|
||||||
value,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public expand() {
|
public expand() {
|
||||||
|
@ -581,17 +581,19 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||||||
confirmText: this.hass.localize("ui.common.submit"),
|
confirmText: this.hass.localize("ui.common.submit"),
|
||||||
});
|
});
|
||||||
|
|
||||||
const value = { ...this.trigger };
|
if (alias !== null) {
|
||||||
if (!alias) {
|
const value = { ...this.trigger };
|
||||||
delete value.alias;
|
if (alias === "") {
|
||||||
} else {
|
delete value.alias;
|
||||||
value.alias = alias;
|
} else {
|
||||||
}
|
value.alias = alias;
|
||||||
fireEvent(this, "value-changed", {
|
}
|
||||||
value,
|
fireEvent(this, "value-changed", {
|
||||||
});
|
value,
|
||||||
if (this._yamlMode) {
|
});
|
||||||
this._yamlEditor?.setValue(value);
|
if (this._yamlMode) {
|
||||||
|
this._yamlEditor?.setValue(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user