Skip to content

Build your personal knowledge base with Trilium Notes

fix(views/calendar): not refreshing on note title change

Elian Doran3debf3ce1ccc
diff --git a/apps/client/src/widgets/view_widgets/calendar_view.ts b/apps/client/src/widgets/view_widgets/calendar_view.ts
index e4cb03f17c..65de14e4ea 100644
--- a/apps/client/src/widgets/view_widgets/calendar_view.ts
+++ b/apps/client/src/widgets/view_widgets/calendar_view.ts
@@ -401,9 +401,14 @@ export default class CalendarView extends ViewMode<{}> {
return true;
}
+ // Refresh on note title change.
+ if (loadResults.getNoteIds().some(noteId => this.noteIds.includes(noteId))) {
+ this.calendar?.refetchEvents();
+ }
+
// Refresh dataset on subnote change.
- if (this.calendar && loadResults.getAttributeRows().some((a) => this.noteIds.includes(a.noteId ?? ""))) {
- this.calendar.refetchEvents();
+ if (loadResults.getAttributeRows().some((a) => this.noteIds.includes(a.noteId ?? ""))) {
+ this.calendar?.refetchEvents();
}
}