This is an automated email from the ASF dual-hosted git repository.

robin0716 pushed a commit to branch feat/1.3.5/embed
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


The following commit(s) were added to refs/heads/feat/1.3.5/embed by this push:
     new fc0c2804 refactor(schemaForm): remove title
fc0c2804 is described below

commit fc0c2804a4ccbbf2d0a7cba0b28c41937561712d
Author: robin <[email protected]>
AuthorDate: Fri May 31 16:07:03 2024 +0800

    refactor(schemaForm): remove title
---
 ui/src/components/SchemaForm/components/Switch.tsx | 3 ---
 ui/src/components/SchemaForm/index.tsx             | 1 -
 2 files changed, 4 deletions(-)

diff --git a/ui/src/components/SchemaForm/components/Switch.tsx 
b/ui/src/components/SchemaForm/components/Switch.tsx
index 0454f79a..336142ae 100644
--- a/ui/src/components/SchemaForm/components/Switch.tsx
+++ b/ui/src/components/SchemaForm/components/Switch.tsx
@@ -23,7 +23,6 @@ import { Form } from 'react-bootstrap';
 import type * as Type from '@/common/interface';
 
 interface Props {
-  title: string;
   label: string | undefined;
   fieldName: string;
   onChange?: (fd: Type.FormDataType) => void;
@@ -31,7 +30,6 @@ interface Props {
   readOnly?: boolean;
 }
 const Index: FC<Props> = ({
-  title,
   fieldName,
   onChange,
   label,
@@ -55,7 +53,6 @@ const Index: FC<Props> = ({
   };
   return (
     <Form.Check
-      id={`switch-${title}`}
       name={fieldName}
       type="switch"
       label={label}
diff --git a/ui/src/components/SchemaForm/index.tsx 
b/ui/src/components/SchemaForm/index.tsx
index 51fc4655..1fe8c8c1 100644
--- a/ui/src/components/SchemaForm/index.tsx
+++ b/ui/src/components/SchemaForm/index.tsx
@@ -318,7 +318,6 @@ const SchemaForm: ForwardRefRenderFunction<FormRef, 
FormProps> = (
             ) : null}
             {widget === 'switch' ? (
               <Switch
-                title={title}
                 label={uiOpt && 'label' in uiOpt ? uiOpt.label : ''}
                 fieldName={key}
                 onChange={onChange}

Reply via email to