refactor(contextmenu): excludes now ensures negation
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
e4ea05fd07
commit
7826897b35
|
@ -172,9 +172,14 @@ export default class Contextmenu {
|
||||||
excludeSelection() {
|
excludeSelection() {
|
||||||
let where = {[this.fieldName]: {neq: this.fieldValue}};
|
let where = {[this.fieldName]: {neq: this.fieldValue}};
|
||||||
if (this.exprBuilder) {
|
if (this.exprBuilder) {
|
||||||
where = buildFilter(where, (param, value) =>
|
where = buildFilter(where, (param, value) => {
|
||||||
this.exprBuilder({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});
|
this.model.addFilter({where});
|
||||||
|
|
Loading…
Reference in New Issue