From 2b5a566e58adaaa7ab2b089c97038a5eb8d4b8cd Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Mon, 8 May 2023 13:38:30 +0800 Subject: [PATCH] refactor: association schemaInitialize --- .../schema-component/antd/association-field/FileManager.tsx | 2 -- .../src/schema-component/antd/association-field/ReadPretty.tsx | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/association-field/FileManager.tsx b/packages/core/client/src/schema-component/antd/association-field/FileManager.tsx index 6acc13919c..e9cff386c0 100644 --- a/packages/core/client/src/schema-component/antd/association-field/FileManager.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/FileManager.tsx @@ -65,7 +65,6 @@ const InternalFileManager = (props) => { const [selectedRows, setSelectedRows] = useState([]); const insertSelector = useInsertSchema('Selector'); const fieldNames = useFieldNames(props); - console.log(fieldNames) const field: any = useField(); const [options, setOptions] = useState([]); const { getField } = useCollection(); @@ -180,7 +179,6 @@ const FileManageReadPretty = connect((props) => { const field: any = useField(); const { getField } = useCollection(); const collectionField = getField(field.props.name); - console.log(props) return collectionField ? : null; }); diff --git a/packages/core/client/src/schema-component/antd/association-field/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/association-field/ReadPretty.tsx index 387d85c1d2..d2c02fdef1 100644 --- a/packages/core/client/src/schema-component/antd/association-field/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/ReadPretty.tsx @@ -15,8 +15,7 @@ export const ReadPretty = (props) => { const { getCollection } = useCollectionManager(); const collectionField = getField(field.props.name); const isFileCollection = getCollection(collectionField?.target).template === 'file'; - const [currentMode, setCurrentMode] = useState(props.mode || isFileCollection ? 'FileManager' : 'Select'); - console.log(props) + const [currentMode, setCurrentMode] = useState(props.mode || (isFileCollection ? 'FileManager' : 'Select')); useEffect(() => { props.mode && setCurrentMode(props.mode); }, [props.mode]);