mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix data-table sort by unknown column (#24965)
Fix database sort by unknown column
This commit is contained in:
parent
13aeb02b53
commit
9df5141aac
@ -645,7 +645,8 @@ export class HaDataTable extends LitElement {
|
||||
return;
|
||||
}
|
||||
|
||||
const prom = this.sortColumn
|
||||
const prom =
|
||||
this.sortColumn && this._sortColumns[this.sortColumn]
|
||||
? sortData(
|
||||
filteredData,
|
||||
this._sortColumns[this.sortColumn],
|
||||
|
@ -260,8 +260,9 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
|
||||
<ha-assist-chip
|
||||
slot="trigger"
|
||||
.label=${localize("ui.components.subpage-data-table.sort_by", {
|
||||
sortColumn: this._sortColumn
|
||||
? ` ${this.columns[this._sortColumn]?.title || this.columns[this._sortColumn]?.label}` ||
|
||||
sortColumn:
|
||||
this._sortColumn && this.columns[this._sortColumn]
|
||||
? ` ${this.columns[this._sortColumn].title || this.columns[this._sortColumn].label}` ||
|
||||
""
|
||||
: "",
|
||||
})}
|
||||
|
Loading…
x
Reference in New Issue
Block a user