From 768f27b1b98afed01233956e8c18e967d5dfc0f1 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 30 May 2025 16:47:54 +0200 Subject: [PATCH] Add label to collapse button in data table groups (#25653) --- src/components/data-table/ha-data-table.ts | 8 +++++--- src/translations/en.json | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index 2c3cfc28c7..b0cf4bab88 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -740,6 +740,7 @@ export class HaDataTable extends LitElement { }, {}); const groupedItems: DataTableRowData[] = []; Object.entries(sorted).forEach(([groupName, rows]) => { + const collapsed = collapsedGroups.includes(groupName); groupedItems.push({ append: true, selectable: false, @@ -751,9 +752,10 @@ export class HaDataTable extends LitElement { > ${groupName === UNDEFINED_GROUP_KEY diff --git a/src/translations/en.json b/src/translations/en.json index 0d2a4cc0e9..4068dc710c 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -902,6 +902,8 @@ "hidden": "{number} hidden", "clear": "Clear", "ungrouped": "Ungrouped", + "collapse": "Collapse", + "expand": "Expand", "settings": { "header": "Customize", "hide": "Hide column {title}",