mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
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 });
|
items.push({ append: true, content: this.appendRow });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hasFab) {
|
|
||||||
items.push({ empty: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.groupColumn) {
|
if (this.groupColumn) {
|
||||||
const grouped = groupBy(items, (item) => item[this.groupColumn!]);
|
const grouped = groupBy(items, (item) => item[this.groupColumn!]);
|
||||||
if (grouped.undefined) {
|
if (grouped.undefined) {
|
||||||
@ -555,6 +551,10 @@ export class HaDataTable extends LitElement {
|
|||||||
} else {
|
} else {
|
||||||
this._items = items;
|
this._items = items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.hasFab) {
|
||||||
|
this._items = [...this._items, { empty: true }];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this._items = data;
|
this._items = data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user