From e8a7e321f08a7b100a1291bef59aa76fcd029e86 Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 9 Apr 2022 15:24:29 +0800 Subject: [PATCH] feat: accept attribute for the upload component --- .../client/src/collection-manager/interfaces/attachment.ts | 7 +++++++ .../src/collection-manager/interfaces/properties/index.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/client/src/collection-manager/interfaces/attachment.ts b/packages/client/src/collection-manager/interfaces/attachment.ts index a61de8663..b36db1494 100644 --- a/packages/client/src/collection-manager/interfaces/attachment.ts +++ b/packages/client/src/collection-manager/interfaces/attachment.ts @@ -47,6 +47,13 @@ export const attachment: IField = { }, properties: { ...defaultProps, + 'uiSchema.x-component-props.accept': { + type: 'string', + title: '{{t("Accept")}}', + 'x-component': 'Input', + 'x-decorator': 'FormItem', + description: 'Example: .doc,.docx', + }, 'uiSchema.x-component-props.multiple': { type: 'boolean', 'x-content': "{{t('Allow uploading multiple files')}}", diff --git a/packages/client/src/collection-manager/interfaces/properties/index.ts b/packages/client/src/collection-manager/interfaces/properties/index.ts index 632f908ca..7311149b5 100644 --- a/packages/client/src/collection-manager/interfaces/properties/index.ts +++ b/packages/client/src/collection-manager/interfaces/properties/index.ts @@ -206,7 +206,7 @@ export const recordPickerSelector: ISchema = { title: '{{ t("Select record") }}', 'x-component': 'RecordPicker.Selector', 'x-component-props': { - className: 'nb-record-picker-selector' + className: 'nb-record-picker-selector', }, properties: { grid: {