mirror of
https://github.com/zadam/trilium.git
synced 2026-02-28 01:23:37 +01:00
fix(breadcrumb): note title update (#8784)
This commit is contained in:
commit
4ef72fb35b
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user