Fix wrong label selected when filtering labels (#25180)

Fix filtered labels
This commit is contained in:
Simon Lamon 2025-04-26 18:27:15 +02:00 committed by GitHub
parent ee495a432f
commit 51ca3e277c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,9 +174,14 @@ export class HaFilterLabels extends SubscribeMixin(LitElement) {
}
const value: string[] = [];
const filteredLabels = this._filteredLabels(
this._labels,
this._filter,
this.value
);
for (const index of ev.detail.index) {
const labelId = this._labels[index].label_id;
const labelId = filteredLabels[index].label_id;
value.push(labelId);
}
this.value = value;