mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
d17bbaca95
@ -17,6 +17,7 @@ import {
|
|||||||
useAPIClient,
|
useAPIClient,
|
||||||
useCurrentAppInfo,
|
useCurrentAppInfo,
|
||||||
useRecord,
|
useRecord,
|
||||||
|
useApp,
|
||||||
SchemaComponent,
|
SchemaComponent,
|
||||||
SchemaComponentContext,
|
SchemaComponentContext,
|
||||||
useCompile,
|
useCompile,
|
||||||
@ -112,6 +113,7 @@ export const ConfigurationTable = () => {
|
|||||||
const resource = api.resource('dbViews');
|
const resource = api.resource('dbViews');
|
||||||
const compile = useCompile();
|
const compile = useCompile();
|
||||||
const form = useForm();
|
const form = useForm();
|
||||||
|
const app = useApp();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -169,12 +171,25 @@ export const ConfigurationTable = () => {
|
|||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
data: fields,
|
data: fields,
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
return data?.map((item: any) => {
|
return data
|
||||||
return {
|
.filter((field) => {
|
||||||
label: compile(item.uiSchema?.title) || item.name,
|
if (!field.interface) {
|
||||||
value: item.name,
|
return false;
|
||||||
};
|
}
|
||||||
});
|
const interfaceOptions = app.dataSourceManager.collectionFieldInterfaceManager.getFieldInterface(
|
||||||
|
field.interface,
|
||||||
|
);
|
||||||
|
if (interfaceOptions.titleUsable) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
?.map((item: any) => {
|
||||||
|
return {
|
||||||
|
label: compile(item.uiSchema?.title) || item.name,
|
||||||
|
value: item.name,
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user