@danielgindi/selectbox 1.0.83 → 1.0.85
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/dist/lib.cjs.js +17 -17
- 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 -10
- 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 +17 -17
- 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 +6 -6
- package/lib/SelectBox.js +3 -3
- package/package.json +1 -1
- package/vue/DropList.vue +10 -1
package/dist/lib.es6.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 1.0.
|
|
2
|
+
* @danielgindi/selectbox 1.0.85
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
import { createElement, closestUntil, setElementAttrs, next, prev } from '@danielgindi/dom-utils/lib/Dom';
|
|
@@ -508,7 +508,7 @@ class DropList {
|
|
|
508
508
|
return this;
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
-
triggerItemSelection(event) {
|
|
511
|
+
triggerItemSelection(item, event) {
|
|
512
512
|
const p = this._p;
|
|
513
513
|
|
|
514
514
|
p.focusItemEl = p.focusItemEl || closestUntil(event.target, 'li', p.el);
|
|
@@ -516,7 +516,7 @@ class DropList {
|
|
|
516
516
|
if (p.focusItemIndex === undefined)
|
|
517
517
|
p.focusItemIndex = -1;
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
item = item ?? p.focusItemEl[ItemSymbol$1];
|
|
520
520
|
if (item._nointeraction) {
|
|
521
521
|
return false;
|
|
522
522
|
}
|
|
@@ -1486,7 +1486,7 @@ class DropList {
|
|
|
1486
1486
|
|
|
1487
1487
|
if (!this._mouseHandled) {
|
|
1488
1488
|
|
|
1489
|
-
this.triggerItemSelection(event);
|
|
1489
|
+
this.triggerItemSelection(null, event);
|
|
1490
1490
|
|
|
1491
1491
|
// If we are destroyed in response to a click/select, cease all actions
|
|
1492
1492
|
if (this[DestroyedSymbol$1])
|
|
@@ -1651,7 +1651,7 @@ class DropList {
|
|
|
1651
1651
|
break;
|
|
1652
1652
|
|
|
1653
1653
|
case VALUE_ENTER:
|
|
1654
|
-
this.triggerItemSelection(event);
|
|
1654
|
+
this.triggerItemSelection(null, event);
|
|
1655
1655
|
event.preventDefault();
|
|
1656
1656
|
break;
|
|
1657
1657
|
|
|
@@ -1733,7 +1733,7 @@ class DropList {
|
|
|
1733
1733
|
this._focus(evt, next || null, matchIndex);
|
|
1734
1734
|
|
|
1735
1735
|
if (!this.isVisible()) {
|
|
1736
|
-
this.triggerItemSelection(evt);
|
|
1736
|
+
this.triggerItemSelection(null, evt);
|
|
1737
1737
|
}
|
|
1738
1738
|
|
|
1739
1739
|
// Record the last filter used
|
|
@@ -1927,7 +1927,7 @@ class DropList {
|
|
|
1927
1927
|
this._focus(event, next || null, nextIndex);
|
|
1928
1928
|
|
|
1929
1929
|
if (!this.isVisible()) {
|
|
1930
|
-
this.triggerItemSelection(event);
|
|
1930
|
+
this.triggerItemSelection(item, event);
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
1933
|
|
|
@@ -4212,7 +4212,7 @@ class SelectBox {
|
|
|
4212
4212
|
suppressEnterSpaceToggle = true;
|
|
4213
4213
|
if (p.multi)
|
|
4214
4214
|
dropList.toggleFocusedItem(evt);
|
|
4215
|
-
else dropList.triggerItemSelection(evt);
|
|
4215
|
+
else dropList.triggerItemSelection(null, evt);
|
|
4216
4216
|
evt.preventDefault();
|
|
4217
4217
|
}
|
|
4218
4218
|
}
|
|
@@ -4222,14 +4222,14 @@ class SelectBox {
|
|
|
4222
4222
|
if (dropList.isVisible() && dropList.hasFocusedItem()) {
|
|
4223
4223
|
suppressEnterSpaceToggle = true;
|
|
4224
4224
|
evt.preventDefault();
|
|
4225
|
-
dropList.triggerItemSelection(evt);
|
|
4225
|
+
dropList.triggerItemSelection(null, evt);
|
|
4226
4226
|
}
|
|
4227
4227
|
|
|
4228
4228
|
break;
|
|
4229
4229
|
|
|
4230
4230
|
case VALUE_TAB:
|
|
4231
4231
|
if (dropList.isVisible() && dropList.hasFocusedItem()) {
|
|
4232
|
-
dropList.triggerItemSelection(evt);
|
|
4232
|
+
dropList.triggerItemSelection(null, evt);
|
|
4233
4233
|
}
|
|
4234
4234
|
break;
|
|
4235
4235
|
|