mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 09:46:25 +08:00
make sure to save the search note before refreshing the tree
This commit is contained in:
parent
77279dfe16
commit
99e56a9c42
1 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import noteDetailService from "./note_detail.js";
|
||||
import treeService from "./tree.js";
|
||||
import infoService from './info.js';
|
||||
|
||||
const $searchString = $("#search-string");
|
||||
const $component = $('#note-detail-search');
|
||||
|
@ -27,7 +28,13 @@ function show() {
|
|||
$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 {
|
||||
getContent,
|
||||
|
|
Loading…
Reference in a new issue