mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:38:51 +00:00
fix: association scope inherit (#1806)
This commit is contained in:
parent
54432a4314
commit
8aee0eef9b
@ -159,9 +159,9 @@ export const useCollectionFilterOptions = (collectionName: string) => {
|
||||
};
|
||||
const options = getOptions(fields, 1);
|
||||
const compile = useCompile();
|
||||
const { getChildrenCollections } = useCollectionManager();
|
||||
const collection = useCollection();
|
||||
const childrenCollections = getChildrenCollections(collection.name);
|
||||
const { getChildrenCollections, getCollection } = useCollectionManager();
|
||||
const collection = getCollection(collectionName);
|
||||
const childrenCollections = getChildrenCollections(collectionName);
|
||||
if (childrenCollections.length > 0 && !options.find((v) => v.name == 'tableoid')) {
|
||||
options.push({
|
||||
name: 'tableoid',
|
||||
@ -169,7 +169,7 @@ export const useCollectionFilterOptions = (collectionName: string) => {
|
||||
title: '{{t("Table OID(Inheritance)")}}',
|
||||
schema: {
|
||||
'x-component': 'Select',
|
||||
enum: [{ value: collection.name, label: compile(collection.title) }].concat(
|
||||
enum: [{ value: collectionName, label: compile(collection.title) }].concat(
|
||||
childrenCollections.map((v) => {
|
||||
return {
|
||||
value: v.name,
|
||||
|
@ -47,7 +47,7 @@ export const FilterItem = observer((props: any) => {
|
||||
/>
|
||||
{!operator?.noValue &&
|
||||
React.createElement(DynamicComponent, {
|
||||
value,
|
||||
value: value ? value : undefined,
|
||||
schema,
|
||||
onChange(value) {
|
||||
setValue(value);
|
||||
|
Loading…
Reference in New Issue
Block a user