jsl-ui 9.18.4 → 9.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ export interface IAutoSuggestOptions {
10
10
  menuClass?: string;
11
11
  renderItem?: (item: any, search: string) => string;
12
12
  onSelect?: (e: any, term: string, dom: HTMLElement) => void;
13
+ onChange?: (val: string) => void;
13
14
  }
14
15
  export interface IAutoSuggest {
15
16
  destroy: () => void;
@@ -130,6 +130,10 @@ var autoComplete = (function () {
130
130
  //} else if (that !== document.activeElement) { setTimeout(function() { that.focus(); }, 200); }
131
131
  };
132
132
  addEvent(that, 'blur', that.blurHandler);
133
+ that.inputHandler = function () {
134
+ options.onChange(that.value);
135
+ };
136
+ addEvent(that, 'input', that.inputHandler);
133
137
  suggest = function (data) {
134
138
  var val = that.value;
135
139
  that.cache[val] = data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsl-ui",
3
- "version": "9.18.4",
3
+ "version": "9.19.1",
4
4
  "description": "javascript UI library",
5
5
  "main": "lib/index.js",
6
6
  "files": [