fix: Allow querying by email address in share popover
This commit is contained in:
@@ -426,15 +426,22 @@ function SuggestionsMenu<T extends MenuItem>(props: Props<T>) {
|
||||
}
|
||||
|
||||
return (
|
||||
(item.title || "").toLowerCase().includes(searchInput) ||
|
||||
(item.keywords || "").toLowerCase().includes(searchInput)
|
||||
(item.title || "").toLocaleLowerCase().includes(searchInput) ||
|
||||
(item.keywords || "").toLocaleLowerCase().includes(searchInput)
|
||||
);
|
||||
});
|
||||
|
||||
return filterExcessSeparators(
|
||||
filtered.sort((item) =>
|
||||
searchInput && item.title ? commandScore(item.title, searchInput) : 0
|
||||
)
|
||||
filtered
|
||||
.map((item) => ({
|
||||
item,
|
||||
score:
|
||||
searchInput && item.title
|
||||
? commandScore(item.title, searchInput)
|
||||
: 0,
|
||||
}))
|
||||
.sort((a, b) => b.score - a.score)
|
||||
.map(({ item }) => item)
|
||||
);
|
||||
}, [commands, props]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user