Hi, my code refresh the query builder every I change the treeView node.
The problem occurrers in thisscenario:
1. In the treeNode A, I create a simple query "Content starts with 'A'"
2. After that, I change the treeNode (with an empty query), so the currentQuery was change to an empty object {},
scope.$watch('currentQuery', function (newValue, oldValue) { if(scope.currentQuery) { // a new node has
vm.builder.setRules(scope.currentQuery);
} else {
vm.builder.setRules({});
}
}
3. The Query Builder update and cleared the last query;
4. After that, I select the first treeNode again that contains a query ('Content start...');
5. My code detects the changes on currentQuery and update the builder using setRules(scope.currentQuery);
6. The query builder renders my query again, but when I try to edit it, shows an error.
Basically, the problem occurs when I create a query and save in a variable, clear using setRules({}), load the query with setRules(some query) and try to edit.