From 82ac642d739373759743fbb46ea0b73e70a8e5b4 Mon Sep 17 00:00:00 2001 From: Weiko Date: Mon, 3 Nov 2025 15:32:23 +0100 Subject: [PATCH] Fix calendar view when switched from other layout type not updating state (#15562) ## Context Switching from kanban layout to calendar was not displaying records properly. Adding the missing state update (similar to kanban case a few lines above) --- .../hooks/useSetViewTypeFromLayoutOptionsMenu.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts index 6431ca878c..835ba24afa 100644 --- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts +++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts @@ -175,6 +175,16 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => { }, ]); + loadRecordIndexStates( + { + ...currentView, + type: viewType, + calendarFieldMetadataId, + calendarLayout: ViewCalendarLayout.MONTH, + }, + objectMetadataItem, + ); + if (shouldChangeIcon(currentView.icon, currentView.type)) { updateCurrentViewParams.icon = viewTypeIconMapping(viewType).displayName;