mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:25:52 +00:00
refactor: displayInAssociation
This commit is contained in:
parent
c5a6a17ac8
commit
1ec05fe37e
@ -276,7 +276,7 @@ export const useCollectionManager_deprecated = (dataSourceName?: string) => {
|
||||
// 是否可以作为标题字段
|
||||
const isTitleField = useCallback(
|
||||
(field) => {
|
||||
return getInterface(field.interface)?.titleUsable;
|
||||
return getInterface(field.interface)?.titleUsable && field?.displayInAssociation !== false;
|
||||
},
|
||||
[getInterface],
|
||||
);
|
||||
|
@ -109,6 +109,10 @@ export const useFilterFieldOptions = (fields) => {
|
||||
if (field.filterable === false) {
|
||||
return;
|
||||
}
|
||||
//关系表字段是否支持筛选
|
||||
if (field.displayInAssociation === false && depth > 1) {
|
||||
return;
|
||||
}
|
||||
const fieldInterface = getInterface(field.interface);
|
||||
if (!fieldInterface?.filterable) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user