diff --git a/web/app/components/datasets/create/step-two/index.module.css b/web/app/components/datasets/create/step-two/index.module.css index 85a7f8ab35..db4c616363 100644 --- a/web/app/components/datasets/create/step-two/index.module.css +++ b/web/app/components/datasets/create/step-two/index.module.css @@ -75,6 +75,10 @@ cursor: pointer; } +.disabled { + cursor: not-allowed; +} + .indexItem.disabled:hover { background-color: #fcfcfd; border-color: #f2f4f7; diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx index 3e1e9b6eba..fb2994cd26 100644 --- a/web/app/components/datasets/create/step-two/index.tsx +++ b/web/app/components/datasets/create/step-two/index.tsx @@ -505,6 +505,9 @@ const StepTwo = ({ } const changeToEconomicalType = () => { + if (docForm === ChuckingMode.parentChild) + return + if (!hasSetIndexType) { setIndexType(IndexingType.ECONOMICAL) if (docForm === ChuckingMode.qa) @@ -557,8 +560,12 @@ const StepTwo = ({ icon={{t('datasetCreation.stepTwo.general')}} activeHeaderClassName='bg-gradient-to-r from-[#EFF0F9] to-[#F9FAFB]' description={t('datasetCreation.stepTwo.generalTip')} - isActive={docForm === ChuckingMode.qa || docForm === ChuckingMode.text} - onSelect={() => handleChangeDocform(ChuckingMode.text)} + isActive={ + [ChuckingMode.text, ChuckingMode.qa].includes(docForm) + } + onSwitched={() => + handleChangeDocform(ChuckingMode.text) + } actions={ <>