From f43171f91c51a354fb0d7f8d7f152ab95e8fc16a Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Thu, 5 Oct 2023 08:52:31 -0400 Subject: [PATCH] Fix class field for ha-icon-next/prev (#18118) --- src/components/ha-icon-next.ts | 5 +++-- src/components/ha-icon-prev.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/ha-icon-next.ts b/src/components/ha-icon-next.ts index 041b93338f..607f4242fc 100644 --- a/src/components/ha-icon-next.ts +++ b/src/components/ha-icon-next.ts @@ -1,10 +1,11 @@ import { mdiChevronLeft, mdiChevronRight } from "@mdi/js"; -import { customElement } from "lit/decorators"; +import { customElement, property } from "lit/decorators"; import { HaSvgIcon } from "./ha-svg-icon"; @customElement("ha-icon-next") export class HaIconNext extends HaSvgIcon { - path = document.dir === "ltr" ? mdiChevronRight : mdiChevronLeft; + @property() public override path = + document.dir === "ltr" ? mdiChevronRight : mdiChevronLeft; } declare global { diff --git a/src/components/ha-icon-prev.ts b/src/components/ha-icon-prev.ts index 7f039ed8ff..da93f628da 100644 --- a/src/components/ha-icon-prev.ts +++ b/src/components/ha-icon-prev.ts @@ -1,10 +1,11 @@ import { mdiChevronLeft, mdiChevronRight } from "@mdi/js"; -import { customElement } from "lit/decorators"; +import { customElement, property } from "lit/decorators"; import { HaSvgIcon } from "./ha-svg-icon"; @customElement("ha-icon-prev") export class HaIconPrev extends HaSvgIcon { - path = document.dir === "ltr" ? mdiChevronLeft : mdiChevronRight; + @property() public override path = + document.dir === "ltr" ? mdiChevronLeft : mdiChevronRight; } declare global {