From 1300cffa3b41968e1228f9561a15e73de342c4b6 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 28 Mar 2024 23:13:51 +0100 Subject: [PATCH] Hide show all categories button is no categories (#20255) --- src/components/ha-filter-categories.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/ha-filter-categories.ts b/src/components/ha-filter-categories.ts index 9b5a7c539e18..0555d0638813 100644 --- a/src/components/ha-filter-categories.ts +++ b/src/components/ha-filter-categories.ts @@ -78,13 +78,15 @@ export class HaFilterCategories extends SubscribeMixin(LitElement) { class="ha-scrollbar" activatable > - ${this.hass.localize( - "ui.panel.config.category.filter.show_all" - )} + ${this._categories.length > 0 + ? html`${this.hass.localize( + "ui.panel.config.category.filter.show_all" + )}` + : nothing} ${this._categories.map( (category) => html`