Fix ignored config entries (#5914)
This commit is contained in:
parent
9e1eb41cbe
commit
a0e2cc7a3a
|
@ -147,7 +147,7 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
|||
filter?: string
|
||||
): ConfigEntryExtended[] => {
|
||||
if (!filter) {
|
||||
return configEntries;
|
||||
return [...configEntries];
|
||||
}
|
||||
const options: Fuse.FuseOptions<ConfigEntryExtended> = {
|
||||
keys: ["domain", "localized_domain_name", "title"],
|
||||
|
@ -170,11 +170,11 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
|||
filter
|
||||
);
|
||||
const ignored: ConfigEntryExtended[] = [];
|
||||
filteredConfigEnties.forEach((item, index) => {
|
||||
if (item.source === "ignore") {
|
||||
ignored.push(filteredConfigEnties.splice(index, 1)[0]);
|
||||
for (let i = filteredConfigEnties.length - 1; i >= 0; i--) {
|
||||
if (filteredConfigEnties[i].source === "ignore") {
|
||||
ignored.push(filteredConfigEnties.splice(i, 1)[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
return [groupByIntegration(filteredConfigEnties), ignored];
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue