mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Prevent automation action row issue if event name gets cleared (#8213)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
a8b27e224f
commit
cf43b26e14
@ -7,6 +7,7 @@ import {
|
||||
query,
|
||||
} from "lit-element";
|
||||
import { html } from "lit-html";
|
||||
import { fireEvent } from "../../../../../common/dom/fire_event";
|
||||
import "../../../../../components/entity/ha-entity-picker";
|
||||
import "../../../../../components/ha-service-picker";
|
||||
import "../../../../../components/ha-yaml-editor";
|
||||
@ -51,7 +52,7 @@ export class HaEventAction extends LitElement implements ActionElement {
|
||||
)}
|
||||
name="event"
|
||||
.value=${event}
|
||||
@value-changed=${this._valueChanged}
|
||||
@value-changed=${this._eventChanged}
|
||||
></paper-input>
|
||||
<ha-yaml-editor
|
||||
.label=${this.hass.localize(
|
||||
@ -73,8 +74,11 @@ export class HaEventAction extends LitElement implements ActionElement {
|
||||
handleChangeEvent(this, ev);
|
||||
}
|
||||
|
||||
private _valueChanged(ev: CustomEvent): void {
|
||||
handleChangeEvent(this, ev);
|
||||
private _eventChanged(ev: CustomEvent): void {
|
||||
ev.stopPropagation();
|
||||
fireEvent(this, "value-changed", {
|
||||
value: { ...this.action, event: ev.detail.value },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user