@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/lib/DropList.js
CHANGED
|
@@ -1158,7 +1158,15 @@ class DropList {
|
|
|
1158
1158
|
if (typeof fn === 'function') {
|
|
1159
1159
|
// Send the original items to the filter function
|
|
1160
1160
|
filteredItems = p.filterFn(
|
|
1161
|
-
p.items.map(x =>
|
|
1161
|
+
p.items.map(x => {
|
|
1162
|
+
const y = x[ItemSymbol];
|
|
1163
|
+
if (y !== undefined) {
|
|
1164
|
+
y[ItemSymbol] = x;
|
|
1165
|
+
return y;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
return x;
|
|
1169
|
+
}),
|
|
1162
1170
|
term);
|
|
1163
1171
|
|
|
1164
1172
|
if (Array.isArray(filteredItems)) {
|
package/lib/SelectBox.js
CHANGED
|
@@ -1190,6 +1190,8 @@ class SelectBox {
|
|
|
1190
1190
|
});
|
|
1191
1191
|
};
|
|
1192
1192
|
}
|
|
1193
|
+
|
|
1194
|
+
p.actualFilterFn = fn;
|
|
1193
1195
|
p.dropList?.setFilterFn(fn);
|
|
1194
1196
|
return this;
|
|
1195
1197
|
}
|
|
@@ -1793,8 +1795,8 @@ class SelectBox {
|
|
|
1793
1795
|
filterThrottleWindow: p.filterThrottleWindow,
|
|
1794
1796
|
filterOnEmptyTerm: p.filterOnEmptyTerm,
|
|
1795
1797
|
filterGroups: p.treatGroupSelectionAsItems,
|
|
1796
|
-
filterEmptyGroups: p.treatGroupSelectionAsItems,
|
|
1797
|
-
filterFn: p.
|
|
1798
|
+
filterEmptyGroups: !p.treatGroupSelectionAsItems,
|
|
1799
|
+
filterFn: p.actualFilterFn,
|
|
1798
1800
|
|
|
1799
1801
|
positionOptionsProvider: () => this._getDropListPositionOptions(),
|
|
1800
1802
|
|
package/package.json
CHANGED