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) };
|
||||
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
||||
if (typeof $props.exprBuilder === 'function')
|
||||
Object.assign(where, $props.exprBuilder(key, val));
|
||||
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
||||
const fetchOptions = { where, include, limit };
|
||||
if (fields) fetchOptions.fields = fields;
|
||||
if (sortBy) fetchOptions.order = sortBy;
|
||||
|
|
Loading…
Reference in New Issue