mirror of
https://github.com/zadam/trilium.git
synced 2026-02-16 03:16:58 +01:00
fix(export/share): navigation in search not working
This commit is contained in:
@@ -70,12 +70,15 @@ async function fetchResults(query: string): Promise<SearchResults> {
|
||||
keys: [
|
||||
"title",
|
||||
"content"
|
||||
]
|
||||
],
|
||||
includeScore: true
|
||||
});
|
||||
|
||||
const results = fuse.search<SearchResult>(query);
|
||||
const results = fuse.search<SearchResult>(query, { limit: 5 });
|
||||
console.debug("Search results:", results);
|
||||
const processedResults = results.map(({ item, score }) => ({
|
||||
...item,
|
||||
id: rootUrl + "/" + item.id,
|
||||
score
|
||||
}));
|
||||
return { results: processedResults };
|
||||
|
||||
Reference in New Issue
Block a user