mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:47:10 +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(
|
const isTitleField = useCallback(
|
||||||
(field) => {
|
(field) => {
|
||||||
return getInterface(field.interface)?.titleUsable;
|
return getInterface(field.interface)?.titleUsable && field?.displayInAssociation !== false;
|
||||||
},
|
},
|
||||||
[getInterface],
|
[getInterface],
|
||||||
);
|
);
|
||||||
|
@ -109,6 +109,10 @@ export const useFilterFieldOptions = (fields) => {
|
|||||||
if (field.filterable === false) {
|
if (field.filterable === false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//关系表字段是否支持筛选
|
||||||
|
if (field.displayInAssociation === false && depth > 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const fieldInterface = getInterface(field.interface);
|
const fieldInterface = getInterface(field.interface);
|
||||||
if (!fieldInterface?.filterable) {
|
if (!fieldInterface?.filterable) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user