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)
This commit is contained in:
Weiko
2025-11-03 15:32:23 +01:00
committed by GitHub
parent 1739ee0595
commit 82ac642d73
@@ -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;