mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Same order in device dashboard and device page for config entries (#17104)
This commit is contained in:
parent
a227d7a2cf
commit
82a8b8fd5d
@ -145,8 +145,15 @@ export class HaConfigDevicePage extends LitElement {
|
||||
);
|
||||
|
||||
private _integrations = memoizeOne(
|
||||
(device: DeviceRegistryEntry, entries: ConfigEntry[]): ConfigEntry[] =>
|
||||
entries.filter((entry) => device.config_entries.includes(entry.entry_id))
|
||||
(device: DeviceRegistryEntry, entries: ConfigEntry[]): ConfigEntry[] => {
|
||||
const entryLookup: { [entryId: string]: ConfigEntry } = {};
|
||||
for (const entry of entries) {
|
||||
entryLookup[entry.entry_id] = entry;
|
||||
}
|
||||
return device.config_entries
|
||||
.map((entry) => entryLookup[entry])
|
||||
.filter(Boolean);
|
||||
}
|
||||
);
|
||||
|
||||
private _entities = memoizeOne(
|
||||
|
Loading…
x
Reference in New Issue
Block a user