mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:26:21 +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") }}',
|
title: '{{ t("Edit collection") }}',
|
||||||
properties: {
|
properties: {
|
||||||
...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: {
|
footer: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
'x-component': 'Action.Drawer.Footer',
|
'x-component': 'Action.Drawer.Footer',
|
||||||
|
@ -78,7 +78,6 @@ const getSchema = (schema: IField, record: any, compile, getContainer): ISchema
|
|||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
'x-component': 'Select',
|
'x-component': 'Select',
|
||||||
enum: '{{filterTargetKeyOptions}}',
|
enum: '{{filterTargetKeyOptions}}',
|
||||||
'x-visible': '{{!!isView}}',
|
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
|
@ -29,6 +29,7 @@ import {
|
|||||||
FieldSummary,
|
FieldSummary,
|
||||||
TemplateSummary,
|
TemplateSummary,
|
||||||
useRequest,
|
useRequest,
|
||||||
|
useCollectionRecordData,
|
||||||
} from '@nocobase/client';
|
} from '@nocobase/client';
|
||||||
import { CollectionFields } from './CollectionFields';
|
import { CollectionFields } from './CollectionFields';
|
||||||
import { collectionSchema } from './schemas/collections';
|
import { collectionSchema } from './schemas/collections';
|
||||||
@ -101,7 +102,7 @@ const useNewId = (prefix) => {
|
|||||||
|
|
||||||
export const ConfigurationTable = () => {
|
export const ConfigurationTable = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { interfaces, getCollections } = useCollectionManager_deprecated();
|
const { interfaces, getCollections, getCollection } = useCollectionManager_deprecated();
|
||||||
const {
|
const {
|
||||||
data: { database },
|
data: { database },
|
||||||
} = useCurrentAppInfo();
|
} = useCurrentAppInfo();
|
||||||
@ -163,7 +164,8 @@ export const ConfigurationTable = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadFilterTargetKeys = async (field) => {
|
const loadFilterTargetKeys = async (field) => {
|
||||||
const { fields } = field.form.values;
|
const { name } = field.form.values;
|
||||||
|
const { fields } = getCollection(name);
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
data: fields,
|
data: fields,
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user