Skip to content

Commit

Permalink
Fix empty line in data table when using group_by
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Mar 29, 2024
1 parent e5c43fc commit 518a091
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/data-table/ha-data-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,6 @@ export class HaDataTable extends LitElement {
items.push({ append: true, content: this.appendRow });
}

if (this.hasFab) {
items.push({ empty: true });
}

if (this.groupColumn) {
const grouped = groupBy(items, (item) => item[this.groupColumn!]);
if (grouped.undefined) {
Expand Down Expand Up @@ -555,6 +551,10 @@ export class HaDataTable extends LitElement {
} else {
this._items = items;
}

if (this.hasFab) {
this._items = [...this._items, { empty: true }];
}
} else {
this._items = data;
}
Expand Down

0 comments on commit 518a091

Please sign in to comment.