Fix empty line in data table when using group_by (#20273)
This commit is contained in:
parent
99695d6cb3
commit
abd02eda0f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue