mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Fix wrong label selected when filtering labels (#25180)
Fix filtered labels
This commit is contained in:
parent
ee495a432f
commit
51ca3e277c
@ -174,9 +174,14 @@ export class HaFilterLabels extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const value: string[] = [];
|
const value: string[] = [];
|
||||||
|
const filteredLabels = this._filteredLabels(
|
||||||
|
this._labels,
|
||||||
|
this._filter,
|
||||||
|
this.value
|
||||||
|
);
|
||||||
|
|
||||||
for (const index of ev.detail.index) {
|
for (const index of ev.detail.index) {
|
||||||
const labelId = this._labels[index].label_id;
|
const labelId = filteredLabels[index].label_id;
|
||||||
value.push(labelId);
|
value.push(labelId);
|
||||||
}
|
}
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user