diff --git a/packages/core/client/src/schema-component/antd/action/Action.Drawer.tsx b/packages/core/client/src/schema-component/antd/action/Action.Drawer.tsx index e0550fc43..74994bda5 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Drawer.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Drawer.tsx @@ -20,6 +20,8 @@ export const ActionDrawer: ComposedActionDrawer = observer((props) => { const { visible, setVisible, openSize = 'middle' } = useActionContext(); const schema = useFieldSchema(); const field = useField(); + const openSizeFromParent = schema.parent?.['x-component-props']?.['openSize']; + const finalOpenSize = openSizeFromParent || openSize; const footerSchema = schema.reduceProperties((buf, s) => { if (s['x-component'] === footerNodeName) { return s; @@ -35,7 +37,7 @@ export const ActionDrawer: ComposedActionDrawer = observer((props) => { }} > .nb-form-item { @@ -174,6 +175,10 @@ FormItem.Designer = function Designer() { const fieldSchemaWithoutRequired = _.omit(fieldSchema, 'required'); + const isPickerMode = fieldSchema['x-component-props'].mode === 'Picker'; + const showFieldMode = isAssociationField && fieldModeOptions && !isTableField; + const showModeSelect = showFieldMode && isPickerMode; + return ( @@ -559,7 +564,7 @@ FormItem.Designer = function Designer() { }} /> )} - {isAssociationField && fieldModeOptions && !isTableField && ( + {showFieldMode && ( )} - + {showModeSelect && ( + +
+ {t('Popup size')} +