mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-18 00:41:48 +08:00
Add full text search in autocomplete results
This commit is contained in:
parent
ba1ed34e53
commit
f36594efb7
@ -116,11 +116,12 @@ function fullTextSearch($el, options){
|
|||||||
if (options.fastSearch === false || searchString.trim().length === 0) {
|
if (options.fastSearch === false || searchString.trim().length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$el.trigger('focus');
|
||||||
options.fastSearch = false;
|
options.fastSearch = false;
|
||||||
$el.autocomplete('val', '');
|
$el.autocomplete('val', '');
|
||||||
$el.setSelectedNotePath("");
|
$el.setSelectedNotePath("");
|
||||||
$el.autocomplete('val', searchString);
|
$el.autocomplete('val', searchString);
|
||||||
$el.trigger('focus');
|
// Set a delay to avoid resetting to true before the full text search is completed.
|
||||||
setTimeout(() => { options.fastSearch = true; }, 100);
|
setTimeout(() => { options.fastSearch = true; }, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user