mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
change allowSearchNotes to allowJumpToSearchNotes
This commit is contained in:
parent
1d1c7eb2ca
commit
836fa2deee
@ -44,7 +44,7 @@ async function autocompleteSource(term, cb, options = {}) {
|
||||
].concat(results);
|
||||
}
|
||||
|
||||
if (term.trim().length >= 1 && options.allowSearchNotes) {
|
||||
if (term.trim().length >= 1 && options.allowJumpToSearchNotes) {
|
||||
results = results.concat([
|
||||
{
|
||||
action: 'search-notes',
|
||||
@ -165,7 +165,7 @@ function initNoteAutocomplete($el, options) {
|
||||
autocompleteOptions.debug = true; // don't close on blur
|
||||
}
|
||||
|
||||
if (options.allowSearchNotes) {
|
||||
if (options.allowJumpToSearchNotes) {
|
||||
$el.on('keydown', (event) => {
|
||||
if (event.ctrlKey && event.key === 'Enter') {
|
||||
// Prevent Ctrl + Enter from triggering autoComplete.
|
||||
|
@ -58,7 +58,7 @@ export default class JumpToNoteDialog extends BasicWidget {
|
||||
noteAutocompleteService.initNoteAutocomplete(this.$autoComplete, {
|
||||
allowCreatingNotes: true,
|
||||
hideGoToSelectedNoteButton: true,
|
||||
allowSearchNotes: true,
|
||||
allowJumpToSearchNotes: true,
|
||||
container: this.$results
|
||||
})
|
||||
// clear any event listener added in previous invocation of this function
|
||||
|
@ -70,7 +70,7 @@ export default class EmptyTypeWidget extends TypeWidget {
|
||||
noteAutocompleteService.initNoteAutocomplete(this.$autoComplete, {
|
||||
hideGoToSelectedNoteButton: true,
|
||||
allowCreatingNotes: true,
|
||||
allowSearchNotes: true,
|
||||
allowJumpToSearchNotes: true,
|
||||
container: this.$results
|
||||
})
|
||||
.on('autocomplete:noteselected', function(event, suggestion, dataset) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user