mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:26:44 +00: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 => {
|
export const concatFilter = (f1: SharedFilter, f2: SharedFilter): SharedFilter => {
|
||||||
const newAnd = [f1.$and, f2.$and].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);
|
const newOr = [f1.$or, f2.$or].filter((i) => i).reduce((pre, cur) => pre.concat(cur), []);
|
||||||
const newFilter: SharedFilter = {};
|
const newFilter: SharedFilter = {};
|
||||||
newAnd.length && (newFilter.$and = newAnd);
|
newAnd.length && (newFilter.$and = newAnd);
|
||||||
newOr.length && (newFilter.$or = newOr);
|
newOr.length && (newFilter.$or = newOr);
|
||||||
|
Loading…
Reference in New Issue
Block a user