Commit b41955553a4b8b0a4334b8739bebe388cee953ec

Authored by Renato De Donato
1 parent 926f22fb

filter bug fix

datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js
... ... @@ -85,6 +85,7 @@ var AjaxJsonAlasqlBehavior = {
85 85 selectData : function() {
86 86 var jsonData = [this.properties.json_results.value];
87 87  
  88 + //his._component.fields = (this._component.fields.constructor == Array) ? this._component.fields : JSON.parse(this._component.fields);
88 89 this._component.fields = JSON.parse(this._component.fields);
89 90  
90 91 var provider = this._getProvider(this._component.fields[0]);
... ... @@ -117,7 +118,7 @@ var AjaxJsonAlasqlBehavior = {
117 118 else if(filters[i]["operation"] == "ends")
118 119 where += filters[i]["field"] + " like '%" + filters[i]["value"] + "' AND ";
119 120 else
120   - where += filters[i]["field"] + " " + filters[i]["operation"] + " '" + filters[i]["value"] + "' AND ";
  121 + where += filters[i]["field"] + " " + filters[i]["operation"] + " " + filters[i]["value"] + " AND ";
121 122 }
122 123 where = where.slice(0, -5);
123 124 }
... ...