Skip to content
10 changes: 3 additions & 7 deletions src/common/search/search-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,14 @@ class SearchInput extends LitElement {
@value-changed=${this._filterInputChanged}
.noLabelFloat=${this.noLabelFloat}
>
<ha-svg-icon
.path=${mdiMagnify}
slot="prefix"
class="prefix"
></ha-svg-icon>
<slot name="prefix" slot="prefix">
<ha-svg-icon class="prefix" .path=${mdiMagnify}></ha-svg-icon>
</slot>
${this.filter &&
html`
<mwc-icon-button
slot="suffix"
class="suffix"
@click=${this._clearSearch}
alt="Clear"
title="Clear"
>
<ha-svg-icon .path=${mdiClose}></ha-svg-icon>
Expand Down
1 change: 1 addition & 0 deletions src/common/string/filter/sequence-matching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const fuzzyFilterSort: FuzzyFilterSort = (filter, items) => {
: fuzzySequentialMatch(filter, item.text);
return item;
})
.filter((item) => item.score === undefined || item.score > 0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this in here? This would return all invalid items.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed here: #7430

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's your code 😅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, it is? 😆 Man I need to learn to read git history better. Sigh...

.sort(({ score: scoreA = 0 }, { score: scoreB = 0 }) =>
scoreA > scoreB ? -1 : scoreA < scoreB ? 1 : 0
);
Expand Down
Loading