mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	add frontend API method openTabWithNote, #1645
This commit is contained in:
		| @@ -120,13 +120,15 @@ function BackendScriptApi(currentNote, apiParams) { | ||||
|      * | ||||
|      * @method | ||||
|      * @param {string} query | ||||
|      * @param {SearchContext} [searchContext] | ||||
|      * @param {Object} [searchParams] | ||||
|      * @returns {Note[]} | ||||
|      */ | ||||
|     this.searchForNotes = (query, searchContext) => { | ||||
|         searchContext = searchContext || new SearchContext(); | ||||
|     this.searchForNotes = (query, searchParams = {}) => { | ||||
|         if (searchParams.includeArchivedNotes === undefined) { | ||||
|             searchParams.includeArchivedNotes = true; | ||||
|         } | ||||
|  | ||||
|         const noteIds = searchService.findNotesWithQuery(query, searchContext) | ||||
|         const noteIds = searchService.findNotesWithQuery(query, new SearchContext(searchParams)) | ||||
|             .map(sr => sr.noteId); | ||||
|  | ||||
|         return repository.getNotes(noteIds); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user