Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
non-search notes should have no children limit, #1673
zadam4606e8d118cc
diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.jsindex 357e3a8b41..40683ed525 100644--- a/src/public/app/widgets/note_tree.js+++ b/src/public/app/widgets/note_tree.js@@ -595,7 +595,7 @@ export default class NoteTreeWidget extends TabAwareWidget {let childBranches = parentNote.getFilteredChildBranches();- if (childBranches.length > MAX_SEARCH_RESULTS_IN_TREE) {+ if (parentNote.type === 'search' && childBranches.length > MAX_SEARCH_RESULTS_IN_TREE) {childBranches = childBranches.slice(0, MAX_SEARCH_RESULTS_IN_TREE);}@@ -808,8 +808,7 @@ export default class NoteTreeWidget extends TabAwareWidget {/** @let {FancytreeNode} */let parentNode = this.getNodesByNoteId('root')[0];- const resolvedNotePathSegments = (await treeService.resolveNotePathToSegments(notePath, this.hoistedNoteId, logErrors))- .slice(1);+ let resolvedNotePathSegments = await treeService.resolveNotePathToSegments(notePath, this.hoistedNoteId, logErrors);if (!resolvedNotePathSegments) {if (logErrors) {@@ -819,6 +818,8 @@ export default class NoteTreeWidget extends TabAwareWidget {return;}+ resolvedNotePathSegments = resolvedNotePathSegments.slice(1);+for (const childNoteId of resolvedNotePathSegments) {// we expand only after hoisted note since before then nodes are not actually present in the treeif (parentNode) {