mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Remove sort now that data-table does it (#5508)
This commit is contained in:
parent
cd1bfe1b20
commit
0c06517dcc
@ -108,18 +108,7 @@ class HaConfigAutomation extends PolymerElement {
|
||||
}
|
||||
});
|
||||
|
||||
return automations.sort(function entitySortBy(entityA, entityB) {
|
||||
var nameA = (entityA.attributes.alias || entityA.entity_id).toLowerCase();
|
||||
var nameB = (entityB.attributes.alias || entityB.entity_id).toLowerCase();
|
||||
|
||||
if (nameA < nameB) {
|
||||
return -1;
|
||||
}
|
||||
if (nameA > nameB) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
return automations;
|
||||
}
|
||||
|
||||
computeShowEditor(_edittingAutomation, _creatingNew) {
|
||||
|
@ -1,5 +1,3 @@
|
||||
import "@polymer/app-route/app-route";
|
||||
|
||||
import "./ha-scene-editor";
|
||||
import "./ha-scene-dashboard";
|
||||
|
||||
@ -10,8 +8,6 @@ import {
|
||||
import { property, customElement, PropertyValues } from "lit-element";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { computeStateDomain } from "../../../common/entity/compute_state_domain";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { compare } from "../../../common/string/compare";
|
||||
import { SceneEntity } from "../../../data/scene";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { HassEntities } from "home-assistant-js-websocket";
|
||||
@ -45,14 +41,8 @@ class HaConfigScene extends HassRouterPage {
|
||||
}
|
||||
});
|
||||
|
||||
return scenes.sort((a, b) => {
|
||||
return compare(computeStateName(a), computeStateName(b));
|
||||
return scenes;
|
||||
});
|
||||
});
|
||||
|
||||
public disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
}
|
||||
|
||||
protected updatePageEl(pageEl, changedProps: PropertyValues) {
|
||||
pageEl.hass = this.hass;
|
||||
|
@ -5,7 +5,6 @@ import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||
import "./ha-script-editor";
|
||||
import "./ha-script-picker";
|
||||
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { computeStateDomain } from "../../../common/entity/compute_state_domain";
|
||||
|
||||
class HaConfigScript extends PolymerElement {
|
||||
@ -103,18 +102,7 @@ class HaConfigScript extends PolymerElement {
|
||||
}
|
||||
});
|
||||
|
||||
return scripts.sort(function entitySortBy(entityA, entityB) {
|
||||
var nameA = computeStateName(entityA);
|
||||
var nameB = computeStateName(entityB);
|
||||
|
||||
if (nameA < nameB) {
|
||||
return -1;
|
||||
}
|
||||
if (nameA > nameB) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
return scripts;
|
||||
}
|
||||
|
||||
computeShowEditor(_edittingScript, _creatingNew) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user