Skip to content

Commit

Permalink
Hide show all categories button is no categories (#20255)
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya authored Mar 28, 2024
1 parent 8fbcbb0 commit 1300cff
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/ha-filter-categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ export class HaFilterCategories extends SubscribeMixin(LitElement) {
class="ha-scrollbar"
activatable
>
<ha-list-item
.selected=${!this.value?.length}
.activated=${!this.value?.length}
>${this.hass.localize(
"ui.panel.config.category.filter.show_all"
)}</ha-list-item
>
${this._categories.length > 0
? html`<ha-list-item
.selected=${!this.value?.length}
.activated=${!this.value?.length}
>${this.hass.localize(
"ui.panel.config.category.filter.show_all"
)}</ha-list-item
>`
: nothing}
${this._categories.map(
(category) =>
html`<ha-list-item
Expand Down

0 comments on commit 1300cff

Please sign in to comment.