diff --git a/packages/twenty-front/src/modules/views/view-picker/hooks/useGetAvailableFieldsForKanban.ts b/packages/twenty-front/src/modules/views/view-picker/hooks/useGetAvailableFieldsForKanban.ts index 0f47fcc78f15..1c595472bf6b 100644 --- a/packages/twenty-front/src/modules/views/view-picker/hooks/useGetAvailableFieldsForKanban.ts +++ b/packages/twenty-front/src/modules/views/view-picker/hooks/useGetAvailableFieldsForKanban.ts @@ -37,7 +37,7 @@ export const useGetAvailableFieldsForKanban = () => { navigate( `/settings/objects/${getObjectSlug( objectMetadataItem, - )}/new-field/step-2`, + )}/new-field/step-2?fieldType=${FieldMetadataType.Select}`, ); } else { navigate(`/settings/objects`); diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx index b70ada9a1d32..53ee908a272b 100644 --- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx +++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx @@ -4,7 +4,7 @@ import { zodResolver } from '@hookform/resolvers/zod'; import pick from 'lodash.pick'; import { useEffect, useState } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; -import { useNavigate, useParams } from 'react-router-dom'; +import { useNavigate, useParams, useSearchParams } from 'react-router-dom'; import { H2Title, IconSettings } from 'twenty-ui'; import { z } from 'zod'; @@ -48,6 +48,8 @@ const StyledSettingsObjectFieldTypeSelect = styled( export const SettingsObjectNewFieldStep2 = () => { const navigate = useNavigate(); const { objectSlug = '' } = useParams(); + const [searchParams] = useSearchParams(); + const fieldType = searchParams.get('fieldType') as SettingsSupportedFieldType; const { enqueueSnackBar } = useSnackBar(); const { findActiveObjectMetadataItemBySlug } = @@ -211,6 +213,9 @@ export const SettingsObjectNewFieldStep2 = () => { />