@danielgindi/selectbox 2.0.45 → 2.0.46

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.
package/lib/SelectBox.js CHANGED
@@ -198,7 +198,7 @@ Emits the following events:
198
198
  'search' {value}: input box value has changed
199
199
  'search:focus': input box has gained focus
200
200
  'search:blur': input box has lost focus
201
- 'search:term': search term has been updated
201
+ 'search:term': search term has been updated, before results were re-filtered
202
202
  'input:resize': input box resized
203
203
  'itemschanged' {term, mutated, count}: the current set of items has changed
204
204
  */
@@ -713,8 +713,8 @@ class SelectBox {
713
713
 
714
714
  if (performSearch) {
715
715
  p.filterTerm = p.input.value.trim();
716
- p.dropList?.setSearchTerm(p.filterTerm, performSearch);
717
716
  this._trigger('search:term', p.filterTerm);
717
+ p.dropList?.setSearchTerm(p.filterTerm, performSearch);
718
718
  }
719
719
 
720
720
  return this;
@@ -2275,8 +2275,8 @@ class SelectBox {
2275
2275
  if (p.disabled || p.readOnly) return;
2276
2276
 
2277
2277
  p.filterTerm = p.input.value.trim();
2278
- p.dropList?.setSearchTerm(p.filterTerm, true);
2279
2278
  this._trigger('search:term', p.filterTerm);
2279
+ p.dropList?.setSearchTerm(p.filterTerm, true);
2280
2280
  })
2281
2281
  .add(p.input, 'click.dropdown', () => {
2282
2282
  if (p.disabled || p.readOnly) return;
@@ -3119,8 +3119,8 @@ class SelectBox {
3119
3119
  p.input.value = value == null ? '' : String(value);
3120
3120
 
3121
3121
  p.filterTerm = '';
3122
- p.dropList?.setSearchTerm('', true);
3123
3122
  this._trigger('search:term', p.filterTerm);
3123
+ p.dropList?.setSearchTerm('', true);
3124
3124
  }
3125
3125
 
3126
3126
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielgindi/selectbox",
3
- "version": "2.0.45",
3
+ "version": "2.0.46",
4
4
  "description": "A collection of dom utilities. So you can work natively with the dom without dom frameworks.",
5
5
  "main": "dist/lib.cjs.min.js",
6
6
  "module": "lib/index.js",
package/vue/SelectBox.vue CHANGED
@@ -26,7 +26,7 @@ const isVue3 = version > '3.';
26
26
  * 'search': `string` - input box value has changed
27
27
  * 'search:focus': input box has gained focus
28
28
  * 'search:blur': input box has lost focus
29
- * 'search:term': search term has been updated
29
+ * 'search:term': search term has been updated, before results were re-filtered
30
30
  * 'input:resize': input box resized
31
31
  * 'input' (Vue v2): (on select, clear, addsel, removesel) - fired after any of the above events.
32
32
  * 'update:modelValue' (Vue v3): (on select, clear, addsel, removesel) - fired after any of the above events.