fix: calendar day view - toolbar onView directly sets page state, Calendar remounts via key

This commit is contained in:
Hermes
2026-08-01 12:33:39 +00:00
parent 60dd5a8280
commit b9cce1e452
+7 -2
View File
@@ -266,7 +266,6 @@ function CalendarPage() {
view={view}
defaultView={isMobile ? Views.AGENDA : Views.MONTH}
onNavigate={handleNavigate}
onView={handleViewChange}
onSelectEvent={handleSelectEvent}
onSelectSlot={handleSelectSlot}
onEventDrop={handleEventDrop}
@@ -277,7 +276,13 @@ function CalendarPage() {
showMultiDayTimes
components={{
event: EventComponent,
toolbar: (props: any) => <CustomToolbar {...props} currentView={view} />,
toolbar: (props: any) => (
<CustomToolbar
{...props}
currentView={view}
onView={(newView: string) => setView(newView)}
/>
),
}}
views={["month", "week", "work_week", "day", "agenda"]}
step={30}