@danielgindi/selectbox 2.0.5 → 2.0.7
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 +14 -4
- 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 +14 -4
- 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 +14 -4
- 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 +9 -1
- package/lib/SelectBox.js +4 -2
- package/package.json +1 -1
package/dist/lib.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 2.0.
|
|
2
|
+
* @danielgindi/selectbox 2.0.7
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -1188,7 +1188,15 @@ class DropList {
|
|
|
1188
1188
|
if (typeof fn === 'function') {
|
|
1189
1189
|
// Send the original items to the filter function
|
|
1190
1190
|
filteredItems = p.filterFn(
|
|
1191
|
-
p.items.map((x) =>
|
|
1191
|
+
p.items.map((x) => {
|
|
1192
|
+
const y = x[ItemSymbol];
|
|
1193
|
+
if (y !== undefined) {
|
|
1194
|
+
y[ItemSymbol] = x;
|
|
1195
|
+
return y;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
return x;
|
|
1199
|
+
}),
|
|
1192
1200
|
term);
|
|
1193
1201
|
|
|
1194
1202
|
if (Array.isArray(filteredItems)) {
|
|
@@ -4466,6 +4474,8 @@ class SelectBox {
|
|
|
4466
4474
|
});
|
|
4467
4475
|
};
|
|
4468
4476
|
}
|
|
4477
|
+
|
|
4478
|
+
p.actualFilterFn = fn;
|
|
4469
4479
|
p.dropList?.setFilterFn(fn);
|
|
4470
4480
|
return this;
|
|
4471
4481
|
}
|
|
@@ -5069,8 +5079,8 @@ class SelectBox {
|
|
|
5069
5079
|
filterThrottleWindow: p.filterThrottleWindow,
|
|
5070
5080
|
filterOnEmptyTerm: p.filterOnEmptyTerm,
|
|
5071
5081
|
filterGroups: p.treatGroupSelectionAsItems,
|
|
5072
|
-
filterEmptyGroups: p.treatGroupSelectionAsItems,
|
|
5073
|
-
filterFn: p.
|
|
5082
|
+
filterEmptyGroups: !p.treatGroupSelectionAsItems,
|
|
5083
|
+
filterFn: p.actualFilterFn,
|
|
5074
5084
|
|
|
5075
5085
|
positionOptionsProvider: () => this._getDropListPositionOptions(),
|
|
5076
5086
|
|