mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +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;
|
||||
};
|
||||
|
||||
const getOptions = _.memoize((fields, depth, nonfilterable, dataSourceManager, collectionManager) => {
|
||||
const getOptions = (fields, depth, nonfilterable, dataSourceManager, collectionManager) => {
|
||||
const options = [];
|
||||
fields.forEach((field) => {
|
||||
const option = field2option(field, depth, nonfilterable, dataSourceManager, collectionManager);
|
||||
@ -159,7 +159,7 @@ const getOptions = _.memoize((fields, depth, nonfilterable, dataSourceManager, c
|
||||
}
|
||||
});
|
||||
return options;
|
||||
});
|
||||
};
|
||||
|
||||
export const useFilterFieldOptions = (fields) => {
|
||||
const fieldSchema = useFieldSchema();
|
||||
@ -192,6 +192,7 @@ export const removeNullCondition = (filter, customFlat = flat) => {
|
||||
export const useFilterActionProps = () => {
|
||||
const collection = useCollection();
|
||||
const options = useFilterOptions(collection?.name);
|
||||
console.log(options);
|
||||
const props = useDataBlockProps();
|
||||
return useFilterFieldProps({ options, params: props?.params });
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user