From ab776fc6526a8fc556642218f58ca360380bddc5 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 9 Jun 2020 12:43:14 +0200 Subject: [PATCH] Fixed remove filter --- front/core/components/contextmenu/index.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js index b931c9539..90c14b7e3 100755 --- a/front/core/components/contextmenu/index.js +++ b/front/core/components/contextmenu/index.js @@ -158,7 +158,6 @@ export default class Contextmenu { this.exprBuilder({param, value}) ); } - console.log(where); this.model.addFilter({where}); } @@ -187,18 +186,12 @@ export default class Contextmenu { if (prop === 'and') { for (let [index, param] of instance[prop].entries()) { - if (param === undefined) - console.log('param undefined'); - const [key] = Object.keys(param); if (key == findProp) instance[prop].splice(index, 1); - if (instance[prop] instanceof Array) { - if (!instance[prop][index]) return; - const [firstKey] = Object.keys(instance[prop][index]); - removeProp(instance[prop][index], filterKey, firstKey); - } + if (param[key] instanceof Array) + removeProp(param, filterKey, key); } } }