mirror of
https://github.com/zadam/trilium.git
synced 2026-03-09 13:40:21 +01:00
fix(breadcrumb): note title update (#8784)
This commit is contained in:
@@ -1214,6 +1214,12 @@ export function useNoteTitle(noteId: string | undefined, parentNoteId: string |
|
||||
refresh();
|
||||
});
|
||||
|
||||
// React to external changes.
|
||||
useTriliumEvent("entitiesReloaded", useCallback(({ loadResults }) => {
|
||||
if (loadResults.isNoteReloaded(noteId) || (parentNoteId && loadResults.getBranchRows().some(b => b.noteId === noteId && b.parentNoteId === parentNoteId))) {
|
||||
refresh();
|
||||
}
|
||||
}, [noteId, parentNoteId, refresh]));
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user