1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Data tables: make sorting direction 2-state instead of 3-state (#28160)

* sorting is 2-state

* sorting is 2-state

* sorting is 2-state
This commit is contained in:
ildar170975
2025-11-27 10:54:38 +03:00
committed by GitHub
parent e80a855f87
commit 0b6e35eb53
3 changed files with 6 additions and 6 deletions

View File

@@ -838,10 +838,10 @@ export class HaDataTable extends LitElement {
} else if (this.sortDirection === "asc") {
this.sortDirection = "desc";
} else {
this.sortDirection = null;
this.sortDirection = "asc";
}
this.sortColumn = this.sortDirection === null ? undefined : columnId;
this.sortColumn = columnId;
fireEvent(this, "sorting-changed", {
column: columnId,

View File

@@ -621,9 +621,9 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
} else if (this._sortDirection === "asc") {
this._sortDirection = "desc";
} else {
this._sortDirection = null;
this._sortDirection = "asc";
}
this._sortColumn = this._sortDirection === null ? undefined : columnId;
this._sortColumn = columnId;
fireEvent(this, "sorting-changed", {
column: columnId,

View File

@@ -547,9 +547,9 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
} else if (this._sortDirection === "asc") {
this._sortDirection = "desc";
} else {
this._sortDirection = null;
this._sortDirection = "asc";
}
this._sortColumn = this._sortDirection === null ? undefined : columnId;
this._sortColumn = columnId;
}
private _handleGroupBy(ev) {