diff --git a/packages/core/client/src/schema-component/antd/association-field/Editable.tsx b/packages/core/client/src/schema-component/antd/association-field/Editable.tsx index dc75a1bebf..ee47eb0255 100644 --- a/packages/core/client/src/schema-component/antd/association-field/Editable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/Editable.tsx @@ -23,14 +23,13 @@ export const Editable = observer((props: any) => { const collectionField = getField(field.props.name); const isFileCollection = getCollection(collectionField?.target).template === 'file'; const [currentMode, setCurrentMode] = useState(props.mode || (isFileCollection ? 'FileManager' : 'Select')); - const isOldRecordPicker = fieldSchema.reduceProperties((buf, schema) => { if (schema['x-component'].includes('RecordPicker.')) { return schema; } return buf; }, null); - if (isOldRecordPicker) { + if (isOldRecordPicker && !props.mode) { return ; } const useCreateActionProps = () => { 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 d44d946784..75850101c1 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 @@ -29,7 +29,7 @@ export const ReadPretty = observer((props: any) => { return buf; }, null); - if (isOldRecordPicker) { + if (isOldRecordPicker && !props.mode) { return ; } return (