mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 20:27:49 +08:00
fix: association filter (#1301)
* fix: pageSize 200 & not a function * fix: filter params wrong
This commit is contained in:
parent
07a01fc507
commit
b80aec9733
@ -35,8 +35,8 @@ export const SharedFilterContext = createContext<SharedFilterContextValue>({
|
||||
});
|
||||
|
||||
export const concatFilter = (f1: SharedFilter, f2: SharedFilter): SharedFilter => {
|
||||
const newAnd = [f1.$and, f2.$and].filter((i) => i);
|
||||
const newOr = [f1.$or, f2.$or].filter((i) => i);
|
||||
const newAnd = [f1.$and, f2.$and].filter((i) => i).reduce((pre, cur) => pre.concat(cur), []);
|
||||
const newOr = [f1.$or, f2.$or].filter((i) => i).reduce((pre, cur) => pre.concat(cur), []);
|
||||
const newFilter: SharedFilter = {};
|
||||
newAnd.length && (newFilter.$and = newAnd);
|
||||
newOr.length && (newFilter.$or = newOr);
|
||||
|
Loading…
Reference in New Issue
Block a user