diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index 06d515a11511..cf442f525f9b 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -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) { @@ -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; }