jsl-ui 9.18.4 → 9.19.0

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;
@@ -124,6 +124,9 @@ var autoComplete = (function () {
124
124
  //var over_sb;
125
125
  //try { over_sb = document.querySelector('.autocomplete-suggestions:hover'); } catch (e) { over_sb = 0; }
126
126
  //if (!over_sb) {
127
+ if (that.last_val !== that.value) {
128
+ options.onChange(that.value);
129
+ }
127
130
  that.last_val = that.value;
128
131
  that.sc.style.display = 'none';
129
132
  //setTimeout(function() { that.sc.style.display = 'none'; }, 350); // hide suggestions on fast input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsl-ui",
3
- "version": "9.18.4",
3
+ "version": "9.19.0",
4
4
  "description": "javascript UI library",
5
5
  "main": "lib/index.js",
6
6
  "files": [