mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-15 07:25:54 +00:00
* Add automation editor * Build JS before running tests * Add browser warning * Re-order from/to in state
12 lines
253 B
JavaScript
12 lines
253 B
JavaScript
export function onChange(ev) {
|
|
const trigger = { ...this.props.trigger };
|
|
|
|
if (ev.target.value) {
|
|
trigger[ev.target.name] = ev.target.value;
|
|
} else {
|
|
delete trigger[ev.target.name];
|
|
}
|
|
|
|
this.props.onChange(this.props.index, trigger);
|
|
}
|