diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 8eb730eb..a2334c9a 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -241,6 +241,16 @@ L.FormBuilder.Element.include({ }, }) +L.FormBuilder.Input.include({ + set: function () { + // Add throttling + if (this._typing) window.clearTimeout(this._typing) + this._typing = window.setTimeout(() => { + this.builder.setter(this.field, this.toJS()) + }, 300) + }, +}) + L.FormBuilder.Select.include({ clear: function () { this.select.value = ''