From 33545a072c93642bb75b09bc45a34aec81b1a661 Mon Sep 17 00:00:00 2001 From: Weiko Date: Wed, 29 Oct 2025 19:04:18 +0100 Subject: [PATCH] Fix creating kanban view when no select field (#15441) Adding an early return when no select field exists and you are redirected to the setting page otherwise it tries to call setAndPersistViewType with kanban and fails with "No fields for kanban - should not happen" --- .../components/ObjectOptionsDropdownLayoutContent.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx index b56c879b13..72b54e13bb 100644 --- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx +++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx @@ -89,6 +89,7 @@ export const ObjectOptionsDropdownLayoutContent = () => { if (availableFieldsForKanban.length === 0) { navigateToSelectSettings(); closeDropdown(dropdownId); + return; } if (currentView?.type !== ViewType.Kanban) { await setAndPersistViewType(ViewType.Kanban); @@ -102,6 +103,7 @@ export const ObjectOptionsDropdownLayoutContent = () => { if (availableFieldsForCalendar.length === 0) { navigateToDateFieldSettings(); closeDropdown(dropdownId); + return; } if (currentView?.type !== ViewType.Calendar) { await setAndPersistViewType(ViewType.Calendar);