Hide show all categories button is no categories (#20255)

This commit is contained in:
Paul Bottein 2024-03-28 23:13:51 +01:00 committed by GitHub
parent 8fbcbb0b68
commit 1300cffa3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 7 deletions

View File

@ -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