visuddhinanda 2 лет назад
Родитель
Сommit
761314a299
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      dashboard/src/components/term/TermEdit.tsx

+ 7 - 1
dashboard/src/components/term/TermEdit.tsx

@@ -1,6 +1,7 @@
 import { useIntl } from "react-intl";
 import {
   ProForm,
+  ProFormDependency,
   ProFormInstance,
   ProFormSelect,
   ProFormText,
@@ -292,7 +293,12 @@ const TermEditWidget = ({
             id: "term.fields.channel.label",
           })}
         />
-        <LangSelect />
+        <ProFormDependency name={["channel"]}>
+          {({ channel }) => {
+            console.log("channel", channel);
+            return <LangSelect disabled={channel[0] === "" ? false : true} />;
+          }}
+        </ProFormDependency>
       </ProForm.Group>
       <ProForm.Group>
         <Form.Item