Merge branch '2970-smart-table' of https://gitea.verdnatura.es/verdnatura/salix into 2970-smart-table

This commit is contained in:
Carlos Jimenez Ruiz 2021-11-09 11:44:25 +01:00
commit bd51ff3761
1 changed files with 8 additions and 3 deletions

View File

@ -172,9 +172,14 @@ export default class Contextmenu {
excludeSelection() {
let where = {[this.fieldName]: {neq: this.fieldValue}};
if (this.exprBuilder) {
where = buildFilter(where, (param, value) =>
this.exprBuilder({param, value})
);
where = buildFilter(where, (param, value) => {
const expr = this.exprBuilder({param, value});
const props = Object.keys(expr);
const newExpr = {};
for (let prop of props)
newExpr[prop] = {neq: this.fieldValue};
return newExpr;
});
}
this.model.addFilter({where});