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,8 +524,9 @@ export default class HaAutomationActionRow extends LitElement {
|
||||
defaultValue: this.action.alias,
|
||||
confirmText: this.hass.localize("ui.common.submit"),
|
||||
});
|
||||
if (alias !== null) {
|
||||
const value = { ...this.action };
|
||||
if (!alias) {
|
||||
if (alias === "") {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
@ -537,6 +538,7 @@ export default class HaAutomationActionRow extends LitElement {
|
||||
this._yamlEditor?.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public expand() {
|
||||
this.updateComplete.then(() => {
|
||||
|
@ -471,9 +471,9 @@ export default class HaAutomationConditionRow extends LitElement {
|
||||
defaultValue: this.condition.alias,
|
||||
confirmText: this.hass.localize("ui.common.submit"),
|
||||
});
|
||||
|
||||
if (alias !== null) {
|
||||
const value = { ...this.condition };
|
||||
if (!alias) {
|
||||
if (alias === "") {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
@ -482,6 +482,7 @@ export default class HaAutomationConditionRow extends LitElement {
|
||||
value,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public expand() {
|
||||
this.updateComplete.then(() => {
|
||||
|
@ -581,8 +581,9 @@ export default class HaAutomationTriggerRow extends LitElement {
|
||||
confirmText: this.hass.localize("ui.common.submit"),
|
||||
});
|
||||
|
||||
if (alias !== null) {
|
||||
const value = { ...this.trigger };
|
||||
if (!alias) {
|
||||
if (alias === "") {
|
||||
delete value.alias;
|
||||
} else {
|
||||
value.alias = alias;
|
||||
@ -594,6 +595,7 @@ export default class HaAutomationTriggerRow extends LitElement {
|
||||
this._yamlEditor?.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public expand() {
|
||||
this.updateComplete.then(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user