mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12: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);
|
].concat(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (term.trim().length >= 1 && options.allowSearchNotes) {
|
if (term.trim().length >= 1 && options.allowJumpToSearchNotes) {
|
||||||
results = results.concat([
|
results = results.concat([
|
||||||
{
|
{
|
||||||
action: 'search-notes',
|
action: 'search-notes',
|
||||||
@ -165,7 +165,7 @@ function initNoteAutocomplete($el, options) {
|
|||||||
autocompleteOptions.debug = true; // don't close on blur
|
autocompleteOptions.debug = true; // don't close on blur
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.allowSearchNotes) {
|
if (options.allowJumpToSearchNotes) {
|
||||||
$el.on('keydown', (event) => {
|
$el.on('keydown', (event) => {
|
||||||
if (event.ctrlKey && event.key === 'Enter') {
|
if (event.ctrlKey && event.key === 'Enter') {
|
||||||
// Prevent Ctrl + Enter from triggering autoComplete.
|
// Prevent Ctrl + Enter from triggering autoComplete.
|
||||||
|
@ -58,7 +58,7 @@ export default class JumpToNoteDialog extends BasicWidget {
|
|||||||
noteAutocompleteService.initNoteAutocomplete(this.$autoComplete, {
|
noteAutocompleteService.initNoteAutocomplete(this.$autoComplete, {
|
||||||
allowCreatingNotes: true,
|
allowCreatingNotes: true,
|
||||||
hideGoToSelectedNoteButton: true,
|
hideGoToSelectedNoteButton: true,
|
||||||
allowSearchNotes: true,
|
allowJumpToSearchNotes: true,
|
||||||
container: this.$results
|
container: this.$results
|
||||||
})
|
})
|
||||||
// clear any event listener added in previous invocation of this function
|
// 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, {
|
noteAutocompleteService.initNoteAutocomplete(this.$autoComplete, {
|
||||||
hideGoToSelectedNoteButton: true,
|
hideGoToSelectedNoteButton: true,
|
||||||
allowCreatingNotes: true,
|
allowCreatingNotes: true,
|
||||||
allowSearchNotes: true,
|
allowJumpToSearchNotes: true,
|
||||||
container: this.$results
|
container: this.$results
|
||||||
})
|
})
|
||||||
.on('autocomplete:noteselected', function(event, suggestion, dataset) {
|
.on('autocomplete:noteselected', function(event, suggestion, dataset) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user