chore: file collection template preset fields should be disabled (#3810)

This commit is contained in:
katherinehhh 2024-03-25 11:39:52 +08:00 committed by GitHub
parent e9e116e476
commit 5e22103e33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -193,6 +193,10 @@ export const PresetFields = observer(
rowSelection={{
type: 'checkbox',
selectedRowKeys,
getCheckboxProps: (record) => ({
disabled: form.values.template === 'file', // Column configuration not to be checked
name: record.name,
}),
onChange: (_, selectedRows) => {
const fields = getDefaultCollectionFields(selectedRows, form.values);
const config = {

View File

@ -150,7 +150,6 @@ export class FileCollectionTemplate extends CollectionTemplate {
title: `{{t("File storage", { ns: "${NAMESPACE}" })}}`,
type: 'hasOne',
name: 'storage',
required: true,
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-reactions': ['{{useAsyncDataSource(loadStorages)}}'],