fix: m2o association field should support pattern configure (#3074)

* fix: m2o association field should support pattern configure

* fix: setInitialValueundefined
This commit is contained in:
katherinehhh 2023-11-22 21:12:08 +08:00 committed by GitHub
parent ea136ab6bc
commit b3dfc939f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ export const useTableBlockProps = () => {
if (!ctx?.service?.loading) {
field.value = [];
field.value = ctx?.service?.data?.data;
field.setInitialValue(ctx?.service?.data?.data);
field?.setInitialValue(ctx?.service?.data?.data);
field.data = field.data || {};
field.data.selectedRowKeys = ctx?.field?.data?.selectedRowKeys;
field.componentProps.pagination = field.componentProps.pagination || {};

View File

@ -584,7 +584,7 @@ FormItem.Designer = function Designer() {
}}
/>
)}
{form && !form?.readPretty && collectionField?.interface !== 'o2m' && !isPatternDisabled(fieldSchema) && (
{form && !form?.readPretty && !isPatternDisabled(fieldSchema) && (
<SchemaSettings.SelectItem
key="pattern"
title={t('Pattern')}