mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:15:11 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
a0e42a027f
@ -58,6 +58,14 @@ const getSchema = (schema: IField, record: any, compile, getContainer): ISchema
|
||||
title: '{{ t("Edit collection") }}',
|
||||
properties: {
|
||||
...properties,
|
||||
filterTargetKey: {
|
||||
title: `{{ t("Record unique key")}}`,
|
||||
type: 'single',
|
||||
description: `{{t( "If a collection lacks a primary key, you must configure a unique record key to locate row records within a block, failure to configure this will prevent the creation of data blocks for the collection.")}}`,
|
||||
'x-decorator': 'FormItem',
|
||||
'x-component': 'Select',
|
||||
'x-reactions': ['{{useAsyncDataSource(loadFilterTargetKeys)}}'],
|
||||
},
|
||||
footer: {
|
||||
type: 'void',
|
||||
'x-component': 'Action.Drawer.Footer',
|
||||
|
@ -78,7 +78,6 @@ const getSchema = (schema: IField, record: any, compile, getContainer): ISchema
|
||||
'x-decorator': 'FormItem',
|
||||
'x-component': 'Select',
|
||||
enum: '{{filterTargetKeyOptions}}',
|
||||
'x-visible': '{{!!isView}}',
|
||||
},
|
||||
footer: {
|
||||
type: 'void',
|
||||
|
@ -29,6 +29,7 @@ import {
|
||||
FieldSummary,
|
||||
TemplateSummary,
|
||||
useRequest,
|
||||
useCollectionRecordData,
|
||||
} from '@nocobase/client';
|
||||
import { CollectionFields } from './CollectionFields';
|
||||
import { collectionSchema } from './schemas/collections';
|
||||
@ -101,7 +102,7 @@ const useNewId = (prefix) => {
|
||||
|
||||
export const ConfigurationTable = () => {
|
||||
const { t } = useTranslation();
|
||||
const { interfaces, getCollections } = useCollectionManager_deprecated();
|
||||
const { interfaces, getCollections, getCollection } = useCollectionManager_deprecated();
|
||||
const {
|
||||
data: { database },
|
||||
} = useCurrentAppInfo();
|
||||
@ -163,7 +164,8 @@ export const ConfigurationTable = () => {
|
||||
};
|
||||
|
||||
const loadFilterTargetKeys = async (field) => {
|
||||
const { fields } = field.form.values;
|
||||
const { name } = field.form.values;
|
||||
const { fields } = getCollection(name);
|
||||
return Promise.resolve({
|
||||
data: fields,
|
||||
}).then(({ data }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user