mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 18:26:41 +00:00
fix: compatible with historical blocks
This commit is contained in:
parent
644d31b39c
commit
7d461193df
@ -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 <RecordPicker {...props} />;
|
||||
}
|
||||
const useCreateActionProps = () => {
|
||||
|
@ -29,7 +29,7 @@ export const ReadPretty = observer((props: any) => {
|
||||
return buf;
|
||||
}, null);
|
||||
|
||||
if (isOldRecordPicker) {
|
||||
if (isOldRecordPicker && !props.mode) {
|
||||
return <RecordPicker.ReadPretty {...props} />;
|
||||
}
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user