fix: collectionField interface undefined

This commit is contained in:
chenos 2023-07-25 18:58:42 +08:00
parent 17ad645e45
commit c8b1668dc0

View File

@ -44,7 +44,7 @@ export const TableColumnDesigner = (props) => {
const { currentMode, field: tableField } = useAssociationFieldContext();
const defaultFilter = fieldSchema?.['x-component-props']?.service?.params?.filter || {};
const dataSource = useCollectionFilterOptions(collectionField?.target);
const isDateField = ['datetime', 'createdAt', 'updatedAt'].includes(collectionField.interface);
const isDateField = ['datetime', 'createdAt', 'updatedAt'].includes(collectionField?.interface);
let readOnlyMode = 'editable';
if (fieldSchema['x-disabled'] === true) {
readOnlyMode = 'readonly';
@ -326,7 +326,6 @@ export const TableColumnDesigner = (props) => {
)}
{isDateField && <SchemaSettings.DataFormat fieldSchema={fieldSchema} />}
{isSubTableColumn && !field?.readPretty && isShowDefaultValue(collectionField, getInterface) && (
<SchemaSettings.DefaultValue fieldSchema={fieldSchema} />
)}