Create a parent note in-place for an existing tree using script? #6840
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @1ridic! I'm Dosu and I’m helping the Trilium team. This is a known UI artifact in TriliumNext: after moving notes programmatically, the frontend tree may not update immediately, causing notes to appear in both old and new positions until you refresh or re-select the parent. The backend data is correct; it's just a frontend update issue see details. To fix this in your script, you should trigger a frontend event to force the tree to refresh after you move the notes. You can do this by emitting a window.dispatchEvent(new Event('treeChanged'));
// or, if available in your context:
api.emit('treeChanged'); This will prompt the UI to update immediately and reflect the new tree structure without needing a manual refresh. This approach is supported by recent frontend improvements in Trilium's event handling see PR #6731. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
@1ridic , it appears to be a bug in the note tree refresh, most likely due to the fact that there are many operations that might come out of order (deleting a branch, creating a new one). |
Beta Was this translation helpful? Give feedback.
-
To be treated as a bug in #6845. |
Beta Was this translation helpful? Give feedback.
To be treated as a bug in #6845.