Skip to content

Commit

Permalink
Process review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed May 26, 2024
1 parent 6551819 commit d9273e6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CSSResultGroup, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../../../../common/dom/fire_event";
import "../../../../../components/ha-textfield";
import { Action, SequenceAction } from "../../../../../data/script";
Expand All @@ -24,12 +25,17 @@ export class HaSequenceAction extends LitElement implements ActionElement {
};
}

private _getMemoizedPath = memoizeOne((path: ItemPath | undefined) => [
...(path ?? []),
"sequence",
]);

protected render() {
const { action } = this;

return html`
<ha-automation-action
.path=${[...(this.path ?? []), "sequence"]}
.path=${this._getMemoizedPath(this.path)}
.actions=${action.sequence}
.disabled=${this.disabled}
@value-changed=${this._actionsChanged}
Expand Down

0 comments on commit d9273e6

Please sign in to comment.