mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 08:46:43 +01:00
exposing tree cache methods to reload note's parents/children to frontend API
This commit is contained in:
@@ -151,6 +151,18 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
|
||||
*/
|
||||
this.getNotes = async (noteIds, silentNotFoundError = false) => await treeCache.getNotes(noteIds, silentNotFoundError);
|
||||
|
||||
/**
|
||||
* @param {string} noteId
|
||||
* @method
|
||||
*/
|
||||
this.reloadChildren = async noteId => await treeCache.reloadChildren(noteId);
|
||||
|
||||
/**
|
||||
* @param {string} noteId
|
||||
* @method
|
||||
*/
|
||||
this.reloadParents = async noteId => await treeCache.reloadParents(noteId);
|
||||
|
||||
/**
|
||||
* Instance name identifies particular Trilium instance. It can be useful for scripts
|
||||
* if some action needs to happen on only one specific instance.
|
||||
|
||||
Reference in New Issue
Block a user