mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: show cascade select when no data in edit form (#4543)
This commit is contained in:
parent
bd54a01754
commit
1b1930b328
@ -311,26 +311,24 @@ export const InternalCascadeSelect = observer(
|
||||
},
|
||||
};
|
||||
return (
|
||||
props.value !== null && (
|
||||
<FormProvider form={selectForm}>
|
||||
{collectionField.interface === 'm2o' ? (
|
||||
<SchemaComponent
|
||||
components={{ FormItem }}
|
||||
schema={{
|
||||
...fieldSchema,
|
||||
default: field.value,
|
||||
title: '',
|
||||
'x-component': AssociationCascadeSelect,
|
||||
'x-component-props': {
|
||||
...props,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<SchemaField schema={schema} />
|
||||
)}
|
||||
</FormProvider>
|
||||
)
|
||||
<FormProvider form={selectForm}>
|
||||
{collectionField.interface === 'm2o' ? (
|
||||
<SchemaComponent
|
||||
components={{ FormItem }}
|
||||
schema={{
|
||||
...fieldSchema,
|
||||
default: field.value,
|
||||
title: '',
|
||||
'x-component': AssociationCascadeSelect,
|
||||
'x-component-props': {
|
||||
...props,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<SchemaField schema={schema} />
|
||||
)}
|
||||
</FormProvider>
|
||||
);
|
||||
},
|
||||
{ displayName: 'InternalCascadeSelect' },
|
||||
|
Loading…
x
Reference in New Issue
Block a user