@danielgindi/selectbox 2.0.42 → 2.0.45
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/css/selectbox.css +1 -1
- package/css/selectbox.css.map +1 -1
- package/dist/lib.cjs.js +10 -1
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +10 -1
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +10 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/DropList.js +5 -0
- package/lib/SelectBox.js +4 -0
- package/package.json +1 -1
- package/scss/selectbox.scss +1 -1
- package/vue/SelectBox.vue +3 -0
package/dist/lib.es6.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 2.0.
|
|
2
|
+
* @danielgindi/selectbox 2.0.45
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
import { createElement, closestUntil, setElementAttrs, next, prev } from '@danielgindi/dom-utils/lib/Dom';
|
|
@@ -1530,6 +1530,11 @@ class DropList {
|
|
|
1530
1530
|
this._updateWidth();
|
|
1531
1531
|
}
|
|
1532
1532
|
|
|
1533
|
+
// Update estimated item heights after width is set
|
|
1534
|
+
if (p.virtualListHelper.isVirtual()) {
|
|
1535
|
+
p.virtualListHelper.render();
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1533
1538
|
// How much space is there above, and how much below?
|
|
1534
1539
|
let roomAbove = targetBox.top - viewport.top;
|
|
1535
1540
|
let roomBelow = viewport.bottom - targetBox.bottom;
|
|
@@ -3508,6 +3513,7 @@ Emits the following events:
|
|
|
3508
3513
|
'search' {value}: input box value has changed
|
|
3509
3514
|
'search:focus': input box has gained focus
|
|
3510
3515
|
'search:blur': input box has lost focus
|
|
3516
|
+
'search:term': search term has been updated
|
|
3511
3517
|
'input:resize': input box resized
|
|
3512
3518
|
'itemschanged' {term, mutated, count}: the current set of items has changed
|
|
3513
3519
|
*/
|
|
@@ -4023,6 +4029,7 @@ class SelectBox {
|
|
|
4023
4029
|
if (performSearch) {
|
|
4024
4030
|
p.filterTerm = p.input.value.trim();
|
|
4025
4031
|
p.dropList?.setSearchTerm(p.filterTerm, performSearch);
|
|
4032
|
+
this._trigger('search:term', p.filterTerm);
|
|
4026
4033
|
}
|
|
4027
4034
|
|
|
4028
4035
|
return this;
|
|
@@ -5584,6 +5591,7 @@ class SelectBox {
|
|
|
5584
5591
|
|
|
5585
5592
|
p.filterTerm = p.input.value.trim();
|
|
5586
5593
|
p.dropList?.setSearchTerm(p.filterTerm, true);
|
|
5594
|
+
this._trigger('search:term', p.filterTerm);
|
|
5587
5595
|
})
|
|
5588
5596
|
.add(p.input, 'click.dropdown', () => {
|
|
5589
5597
|
if (p.disabled || p.readOnly) return;
|
|
@@ -6427,6 +6435,7 @@ class SelectBox {
|
|
|
6427
6435
|
|
|
6428
6436
|
p.filterTerm = '';
|
|
6429
6437
|
p.dropList?.setSearchTerm('', true);
|
|
6438
|
+
this._trigger('search:term', p.filterTerm);
|
|
6430
6439
|
}
|
|
6431
6440
|
|
|
6432
6441
|
/**
|