+ {matches.map((item, index) => (
+
e.preventDefault()}
+ onClick={() => onSelect(item.title)}
+ onMouseEnter={() => onHover(index)}
+ >
+
+ {item.TypeIcon && }
+ {item.title}
+
+ {item.noteType && (
+
+ {item.noteType}
+
+ )}
+
+ ))}
+
+ )
+}
+
+function useWikilinkMatches(entries: VaultEntry[], value: string, open: boolean) {
+ const typeEntryMap = useMemo(() => buildTypeEntryMap(entries), [entries])
+ const wikilinkQuery = extractWikilinkQuery(value)
+ return useMemo(
+ () => (open && wikilinkQuery !== null) ? matchWikilinkEntries(entries, typeEntryMap, wikilinkQuery) : [],
+ [entries, typeEntryMap, wikilinkQuery, open],
+ )
+}
+
+function useScrollSelectedIntoView(menuRef: React.RefObject