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
fix(note paths): avoid remounting rows on every reload
Elian Doranf7e81e8424a8
diff --git a/apps/client/src/widgets/ribbon/NotePathsTab.tsx b/apps/client/src/widgets/ribbon/NotePathsTab.tsxindex 7313767b9a..9573790cb9 100644--- a/apps/client/src/widgets/ribbon/NotePathsTab.tsx+++ b/apps/client/src/widgets/ribbon/NotePathsTab.tsx@@ -44,7 +44,10 @@ export function NotePathsWidget({ sortedNotePaths, currentNotePath, cloneButton<ul className="note-path-list">{sortedNotePaths?.length ? sortedNotePaths.map(sortedNotePath => (<NotePath- key={sortedNotePath.notePath}+ // Keyed by the joined path, not the array: `getAllNotePaths()` hands back+ // fresh arrays on every refresh, so an array key never matches the previous+ // one and each row would remount — blanking its links until they resolve.+ key={sortedNotePath.notePath.join("/")}currentNotePath={currentNotePath}notePathRecord={sortedNotePath}/>