mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
Add full text search in autocomplete
This commit is contained in:
parent
0d9e13c1e0
commit
e877ad68cf
@ -30,6 +30,15 @@ async function autocompleteSourceForCKEditor(queryText) {
|
||||
}
|
||||
|
||||
async function autocompleteSource(term, cb, options = {}, fastSearch = true) {
|
||||
if (fastSearch === false) {
|
||||
cb(
|
||||
[{
|
||||
noteTitle: term,
|
||||
highlightedNotePathTitle: `Searching...`
|
||||
}]
|
||||
);
|
||||
}
|
||||
|
||||
const activeNoteId = appContext.tabManager.getActiveContextNoteId();
|
||||
|
||||
let results = await server.get(`autocomplete?query=${encodeURIComponent(term)}&activeNoteId=${activeNoteId}&fastSearch=${fastSearch}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user