diff --git a/controllets/text-element-controllet/text-element-controllet.html b/controllets/text-element-controllet/text-element-controllet.html index db48d51..339c251 100755 --- a/controllets/text-element-controllet/text-element-controllet.html +++ b/controllets/text-element-controllet/text-element-controllet.html @@ -123,8 +123,6 @@ Example: * @event text-element-controllet_content-changed */ - targets : null, - properties: { /** * It's the name of the elelent @@ -159,10 +157,16 @@ Example: type: String, value : "0" }, + value :{ type: String, value: "", observer : '_valueChanged' + }, + + timer :{ + type: Number, + value : 0 } }, /** @@ -173,7 +177,8 @@ Example: * @param {Event} e */ _valueChanged : function(oldvalue, newValue){ - this.fire('text-element-controllet_content-changed', {newValue: newValue}); + clearTimeout (this.timer); + this.timer = setTimeout(this.fire('text-element-controllet_content-changed', {newValue: newValue}), 2000); }, /** * It returns the value in text area diff --git a/datalets/base-ajax-json-jsonpath-datalet/static/js/AjaxJsonJsonPathBehavior.js b/datalets/base-ajax-json-jsonpath-datalet/static/js/AjaxJsonJsonPathBehavior.js index 0b0bb47..96b319a 100755 --- a/datalets/base-ajax-json-jsonpath-datalet/static/js/AjaxJsonJsonPathBehavior.js +++ b/datalets/base-ajax-json-jsonpath-datalet/static/js/AjaxJsonJsonPathBehavior.js @@ -100,6 +100,7 @@ var AjaxJsonJsonPathBehavior = { selectData : function(){ this.data = []; + this._component.fields = JSON.parse(this._component.fields); for(var i=0;i < this._component.fields.length; i++){