mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:25:15 +00:00
fix: source field type filtering association fields in sql collection & view collection (#5014)
Some checks are pending
auto-merge / push-commit (push) Waiting to run
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
deploy client docs / Build (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase FrontEnd Test / frontend-test (18) (push) Waiting to run
Some checks are pending
auto-merge / push-commit (push) Waiting to run
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
deploy client docs / Build (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase FrontEnd Test / frontend-test (18) (push) Waiting to run
* fix: source field type filtering relationship fields in sql collection and view collection * fix: bug * fix: bug
This commit is contained in:
parent
bd573b6ee2
commit
cd5d48eb80
@ -69,7 +69,7 @@ const PreviewCom = (props) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
const children = collection.fields
|
const children = collection.fields
|
||||||
.filter((v) => !['hasOne', 'hasMany', 'belongsToMany'].includes(v?.type))
|
.filter((v) => !['obo', 'oho', 'm2m', 'o2m'].includes(v?.interface))
|
||||||
?.map((v) => {
|
?.map((v) => {
|
||||||
return { value: v.name, key: v.name, label: t(v.uiSchema?.title || v.name) };
|
return { value: v.name, key: v.name, label: t(v.uiSchema?.title || v.name) };
|
||||||
})
|
})
|
||||||
|
@ -68,11 +68,12 @@ const useSourceFieldsOptions = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const children = (collection.fields as FieldOptions[])
|
const children = (collection.fields as FieldOptions[])
|
||||||
.filter((v) => !['hasOne', 'hasMany', 'belongsToMany'].includes(v?.type))
|
.filter((v) => {
|
||||||
|
return !['hasOne', 'hasMany', 'belongsToMany', 'belongsTo'].includes(v?.type);
|
||||||
|
})
|
||||||
?.map((v) => {
|
?.map((v) => {
|
||||||
return { value: v.name, label: t(v.uiSchema?.title) };
|
return { value: v.name, label: t(v.uiSchema?.title) };
|
||||||
});
|
});
|
||||||
|
|
||||||
data.push({
|
data.push({
|
||||||
value: item,
|
value: item,
|
||||||
label: t(collection.title),
|
label: t(collection.title),
|
||||||
@ -110,7 +111,6 @@ export const FieldsConfigure = observer(
|
|||||||
[compile],
|
[compile],
|
||||||
);
|
);
|
||||||
const sourceFieldsOptions = useSourceFieldsOptions();
|
const sourceFieldsOptions = useSourceFieldsOptions();
|
||||||
|
|
||||||
const refGetInterface = useRef(getInterface);
|
const refGetInterface = useRef(getInterface);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fieldsMp = new Map();
|
const fieldsMp = new Map();
|
||||||
|
Loading…
Reference in New Issue
Block a user