refactor: record picker submit button display by association type (#3283)

This commit is contained in:
katherinehhh 2023-12-29 11:53:04 +08:00 committed by GitHub
parent c6915c69f8
commit 7334e0b3fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,6 +125,9 @@ export const InternalPicker = observer(
}
setVisible(false);
},
style: {
display: multiple !== false && ['o2m', 'm2m'].includes(collectionField?.interface) ? 'block' : 'none',
},
};
};
return (
@ -189,7 +192,12 @@ export const InternalPicker = observer(
<CollectionProvider name={collectionField?.target}>
<FormProvider>
<TableSelectorParamsProvider params={{ filter: getFilter() }}>
<SchemaComponentOptions scope={{ usePickActionProps, useTableSelectorProps }}>
<SchemaComponentOptions
scope={{
usePickActionProps,
useTableSelectorProps,
}}
>
<RecursionField
onlyRenderProperties
basePath={field.address}