mirror of
https://github.com/zadam/trilium.git
synced 2026-01-31 10:54:25 +01:00
Revert "chore(calendar): remove automatic fetching on note creation"
This reverts commit 2a61f51e06ecb476260bf45895245c8a9f68d710.
This commit is contained in:
parent
2a61f51e06
commit
2eae8bbb64
@ -104,17 +104,12 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
|
||||
useResizeObserver(containerRef, () => 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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user