fix: modal not displayed when clicking on the association field in the table (#2292)

This commit is contained in:
katherinehhh 2023-07-23 19:53:09 +08:00 committed by GitHub
parent e5348d7ed6
commit 7ed4ae5018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,19 +13,8 @@ export const ColumnFieldProvider = observer(
}, null);
if (fieldSchema && record?.__collection) {
const fieldName = `${record.__collection}.${fieldSchema.name}`;
const newSchema = {
...schema.toJSON(),
properties: {
[fieldSchema.name]: {
...fieldSchema.toJSON(),
'x-collection-field': fieldName,
'x-component-props': {
...fieldSchema['x-component-props'],
},
},
},
};
return <RecursionField basePath={basePath} schema={newSchema} onlyRenderProperties />;
schema.properties[fieldSchema.name]['x-collection-field'] = fieldName;
return <RecursionField basePath={basePath} schema={schema} onlyRenderProperties />;
}
return props.children;
},