mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +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,
|
defaultValue: this.action.alias,
|
||||||
confirmText: this.hass.localize("ui.common.submit"),
|
confirmText: this.hass.localize("ui.common.submit"),
|
||||||
});
|
});
|
||||||
|
if (alias !== null) {
|
||||||
const value = { ...this.action };
|
const value = { ...this.action };
|
||||||
if (!alias) {
|
if (alias === "") {
|
||||||
delete value.alias;
|
delete value.alias;
|
||||||
} else {
|
} else {
|
||||||
value.alias = alias;
|
value.alias = alias;
|
||||||
@ -537,6 +538,7 @@ export default class HaAutomationActionRow extends LitElement {
|
|||||||
this._yamlEditor?.setValue(value);
|
this._yamlEditor?.setValue(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public expand() {
|
public expand() {
|
||||||
this.updateComplete.then(() => {
|
this.updateComplete.then(() => {
|
||||||
|
@ -471,9 +471,9 @@ 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;
|
||||||
@ -482,6 +482,7 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||||||
value,
|
value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public expand() {
|
public expand() {
|
||||||
this.updateComplete.then(() => {
|
this.updateComplete.then(() => {
|
||||||
|
@ -581,8 +581,9 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||||||
confirmText: this.hass.localize("ui.common.submit"),
|
confirmText: this.hass.localize("ui.common.submit"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (alias !== null) {
|
||||||
const value = { ...this.trigger };
|
const value = { ...this.trigger };
|
||||||
if (!alias) {
|
if (alias === "") {
|
||||||
delete value.alias;
|
delete value.alias;
|
||||||
} else {
|
} else {
|
||||||
value.alias = alias;
|
value.alias = alias;
|
||||||
@ -594,6 +595,7 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||||||
this._yamlEditor?.setValue(value);
|
this._yamlEditor?.setValue(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public expand() {
|
public expand() {
|
||||||
this.updateComplete.then(() => {
|
this.updateComplete.then(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user