From 2eae8bbb644772d35361f9bc8c3e274136a02ba7 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 23 Jan 2026 12:05:12 +0200 Subject: [PATCH] Revert "chore(calendar): remove automatic fetching on note creation" This reverts commit 2a61f51e06ecb476260bf45895245c8a9f68d710. --- apps/client/src/widgets/collections/calendar/index.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsx index 103c64d63..fd7669646 100644 --- a/apps/client/src/widgets/collections/calendar/index.tsx +++ b/apps/client/src/widgets/collections/calendar/index.tsx @@ -104,17 +104,12 @@ export default function CalendarView({ note, noteIds }: ViewModeProps calendarRef.current?.updateSize()); const isCalendarRoot = (calendarRoot || workspaceCalendarRoot); const isEditable = !isCalendarRoot; - const noteIdsRef = useRef(noteIds); - useEffect(() => { - noteIdsRef.current = noteIds; - }, [ noteIds ]); - const eventBuilder = useMemo(() => { if (!isCalendarRoot) { - return async () => await buildEvents(noteIdsRef.current); + return async () => await buildEvents(noteIds); } return async (e: EventSourceFuncArg) => await buildEventsForCalendar(note, e); - }, [isCalendarRoot, note]); + }, [isCalendarRoot, noteIds]); const plugins = usePlugins(isEditable, isCalendarRoot); const locale = useLocale();