Fix search for labels and categories (#20262)

This commit is contained in:
Paul Bottein
2024-03-29 10:25:02 +01:00
committed by GitHub
parent 1300cffa3b
commit 510e010f97
2 changed files with 5 additions and 3 deletions

View File

@@ -385,8 +385,8 @@ export class HaLabelPicker extends SubscribeMixin(LitElement) {
const filteredItems = fuzzyFilterSort<ScorableLabelItem>(
filterString,
target.items?.filter((item) =>
[NO_LABELS_ID, ADD_NEW_ID].includes(item.ignoreFilter)
target.items?.filter(
(item) => ![NO_LABELS_ID, ADD_NEW_ID].includes(item.label_id)
) || []
);
if (filteredItems.length === 0) {