mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 11:12:20 +08:00
fix: filter button nonfilterable field settings affecting other table block with the same collection (#6121)
This commit is contained in:
parent
c14530b9f5
commit
0b6ed37fa4
@ -150,7 +150,7 @@ const field2option = (field, depth, nonfilterable, dataSourceManager, collection
|
|||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getOptions = _.memoize((fields, depth, nonfilterable, dataSourceManager, collectionManager) => {
|
const getOptions = (fields, depth, nonfilterable, dataSourceManager, collectionManager) => {
|
||||||
const options = [];
|
const options = [];
|
||||||
fields.forEach((field) => {
|
fields.forEach((field) => {
|
||||||
const option = field2option(field, depth, nonfilterable, dataSourceManager, collectionManager);
|
const option = field2option(field, depth, nonfilterable, dataSourceManager, collectionManager);
|
||||||
@ -159,7 +159,7 @@ const getOptions = _.memoize((fields, depth, nonfilterable, dataSourceManager, c
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return options;
|
return options;
|
||||||
});
|
};
|
||||||
|
|
||||||
export const useFilterFieldOptions = (fields) => {
|
export const useFilterFieldOptions = (fields) => {
|
||||||
const fieldSchema = useFieldSchema();
|
const fieldSchema = useFieldSchema();
|
||||||
@ -192,6 +192,7 @@ export const removeNullCondition = (filter, customFlat = flat) => {
|
|||||||
export const useFilterActionProps = () => {
|
export const useFilterActionProps = () => {
|
||||||
const collection = useCollection();
|
const collection = useCollection();
|
||||||
const options = useFilterOptions(collection?.name);
|
const options = useFilterOptions(collection?.name);
|
||||||
|
console.log(options);
|
||||||
const props = useDataBlockProps();
|
const props = useDataBlockProps();
|
||||||
return useFilterFieldProps({ options, params: props?.params });
|
return useFilterFieldProps({ options, params: props?.params });
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user