Commit b41955553a4b8b0a4334b8739bebe388cee953ec
1 parent
926f22fb
filter bug fix
Showing
1 changed file
with
2 additions
and
1 deletions
datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js
@@ -85,6 +85,7 @@ var AjaxJsonAlasqlBehavior = { | @@ -85,6 +85,7 @@ var AjaxJsonAlasqlBehavior = { | ||
85 | selectData : function() { | 85 | selectData : function() { |
86 | var jsonData = [this.properties.json_results.value]; | 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 | this._component.fields = JSON.parse(this._component.fields); | 89 | this._component.fields = JSON.parse(this._component.fields); |
89 | 90 | ||
90 | var provider = this._getProvider(this._component.fields[0]); | 91 | var provider = this._getProvider(this._component.fields[0]); |
@@ -117,7 +118,7 @@ var AjaxJsonAlasqlBehavior = { | @@ -117,7 +118,7 @@ var AjaxJsonAlasqlBehavior = { | ||
117 | else if(filters[i]["operation"] == "ends") | 118 | else if(filters[i]["operation"] == "ends") |
118 | where += filters[i]["field"] + " like '%" + filters[i]["value"] + "' AND "; | 119 | where += filters[i]["field"] + " like '%" + filters[i]["value"] + "' AND "; |
119 | else | 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 | where = where.slice(0, -5); | 123 | where = where.slice(0, -5); |
123 | } | 124 | } |