forked from verdnatura/salix-front
perf: imrpove exprBuilder
This commit is contained in:
parent
46dbab4757
commit
8b379faa52
|
@ -183,8 +183,7 @@ async function fetchFilter(val) {
|
||||||
}, {});
|
}, {});
|
||||||
} else defaultWhere = { [key]: getVal(val) };
|
} else defaultWhere = { [key]: getVal(val) };
|
||||||
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
||||||
if (typeof $props.exprBuilder === 'function')
|
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
||||||
Object.assign(where, $props.exprBuilder(key, val));
|
|
||||||
const fetchOptions = { where, include, limit };
|
const fetchOptions = { where, include, limit };
|
||||||
if (fields) fetchOptions.fields = fields;
|
if (fields) fetchOptions.fields = fields;
|
||||||
if (sortBy) fetchOptions.order = sortBy;
|
if (sortBy) fetchOptions.order = sortBy;
|
||||||
|
|
Loading…
Reference in New Issue