mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	make sure to save the search note before refreshing the tree
This commit is contained in:
		| @@ -1,5 +1,6 @@ | |||||||
| import noteDetailService from "./note_detail.js"; | import noteDetailService from "./note_detail.js"; | ||||||
| import treeService from "./tree.js"; | import treeService from "./tree.js"; | ||||||
|  | import infoService from './info.js'; | ||||||
|  |  | ||||||
| const $searchString = $("#search-string"); | const $searchString = $("#search-string"); | ||||||
| const $component = $('#note-detail-search'); | const $component = $('#note-detail-search'); | ||||||
| @@ -27,7 +28,13 @@ function show() { | |||||||
|     $searchString.on('input', noteDetailService.noteChanged); |     $searchString.on('input', noteDetailService.noteChanged); | ||||||
| } | } | ||||||
|  |  | ||||||
| $refreshButton.click(() => treeService.reload()); | $refreshButton.click(async () => { | ||||||
|  |     await noteDetailService.saveNoteIfChanged(); | ||||||
|  |  | ||||||
|  |     treeService.reload(); | ||||||
|  |  | ||||||
|  |     infoService.showMessage('Tree has been refreshed.'); | ||||||
|  | }); | ||||||
|  |  | ||||||
| export default { | export default { | ||||||
|     getContent, |     getContent, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user