mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	autocomplete for add link dialog, #203
This commit is contained in:
		| @@ -44,11 +44,17 @@ function initNoteAutocomplete($el) { | ||||
|                 displayKey: 'title', | ||||
|                 templates: { | ||||
|                     suggestion: function(suggestion) { | ||||
|                         return suggestion.title; | ||||
|                         return suggestion.highlighted; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         ]); | ||||
|  | ||||
|         $el.on('autocomplete:selected', function(event, suggestion, dataset) { | ||||
|             $el.prop("data-selected-path", suggestion.path); | ||||
|         }); | ||||
|  | ||||
|         $el.getSelectedPath = () => $el.prop("data-selected-path"); | ||||
|     } | ||||
|  | ||||
|     return $el; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user