refactor: external data source view collection createMainOnly (#4287)

This commit is contained in:
katherinehhh 2024-05-08 14:47:37 +08:00 committed by GitHub
parent 040d79747c
commit f1923d25cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,7 @@ export class ViewCollectionTemplate extends CollectionTemplate {
'x-component': 'Select',
'x-reactions': ['{{useAsyncDataSource(loadDBViews)}}'],
'x-disabled': '{{ !createOnly }}',
'x-visible': '{{!createMainOnly}}',
},
name: {
type: 'string',
@ -106,6 +107,7 @@ export class ViewCollectionTemplate extends CollectionTemplate {
'x-decorator': 'FormItem',
'x-component': 'Checkbox',
default: false,
'x-visible': '{{!createMainOnly}}',
},
sources: {
type: 'array',
@ -117,6 +119,7 @@ export class ViewCollectionTemplate extends CollectionTemplate {
},
'x-reactions': ['{{useAsyncDataSource(loadCollections)}}'],
'x-disabled': true,
'x-visible': '{{!createMainOnly}}',
},
fields: {
type: 'array',

View File

@ -211,6 +211,7 @@ const EditCollectionAction = (props) => {
createOnly: false,
filterTargetKeyOptions,
isView: record.view,
createMainOnly: true,
...scope,
}}
/>