fix(collections/calendar): events not updating sometimes

This commit is contained in:
Elian Doran 2025-12-02 10:56:58 +02:00
parent dc211b4d00
commit 1a03c0ca9f
No known key found for this signature in database

View File

@ -117,7 +117,10 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
if (loadResults.getNoteIds().some(noteId => noteIds.includes(noteId)) // note title change.
|| loadResults.getAttributeRows().some((a) => noteIds.includes(a.noteId ?? ""))) // subnote change.
{
calendarRef.current?.refetchEvents();
// Defer execution after the load results are processed so that the event builder has the updated data to work with.
setTimeout(() => {
calendarRef.current?.refetchEvents();
}, 0);
}
});