diff --git a/ui/src/components/modals/add-new-model/modal-context-provider.jsx b/ui/src/components/modals/add-new-model/modal-context-provider.jsx index f8a5382c..75556c70 100644 --- a/ui/src/components/modals/add-new-model/modal-context-provider.jsx +++ b/ui/src/components/modals/add-new-model/modal-context-provider.jsx @@ -5,7 +5,7 @@ import { useMemo, useState, } from 'react'; -import { ModelTypeEnum } from '@Src/store/state/models/constants'; +import { DataTypeEnum, ModelTypeEnum } from '@State/models/constants'; import schemaStepFour from './step-four/schema'; import schemaStepOne from './step-one/schema'; import schemaStepThree from './step-three/schema'; @@ -18,7 +18,7 @@ function ModalContextProvider({ children }) { const [isMaximize, setIsMaximize] = useState(false); const useFormbitStepOne = useFormbit({ - initialValues: { modelType: ModelTypeEnum.BINARY_CLASSIFICATION }, + initialValues: { modelType: ModelTypeEnum.BINARY_CLASSIFICATION, dataType: DataTypeEnum.TABULAR }, yup: schemaStepOne, }); diff --git a/ui/src/components/modals/add-new-model/step-one/form-fields.jsx b/ui/src/components/modals/add-new-model/step-one/form-fields.jsx index d4d99c5a..5839be5d 100644 --- a/ui/src/components/modals/add-new-model/step-one/form-fields.jsx +++ b/ui/src/components/modals/add-new-model/step-one/form-fields.jsx @@ -48,21 +48,11 @@ function ModelType() { function DataType() { const { useFormbit } = useModalContext(); - const { form, error, write } = useFormbit; - - const handleOnChange = (value) => { - write('dataType', value); - }; + const { error } = useFormbit; return ( - + {DataTypeEnumLabel[DataTypeEnum.TABULAR]} ); }