@danielgindi/selectbox 1.0.66 → 1.0.67

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
@@ -3215,6 +3215,11 @@ class SelectBox {
3215
3215
  stickyGroup = groups[0].filter(x => stickyValues.has(x[valueProp]));
3216
3216
  if (stickyGroup.length > 0) {
3217
3217
  groups[0] = groups[0].filter(x => !stickyValues.has(x[valueProp]));
3218
+
3219
+ if (groups[0].length === 0)
3220
+ groups.shift();
3221
+ } else {
3222
+ stickyGroup = null;
3218
3223
  }
3219
3224
  }
3220
3225
 
@@ -3239,7 +3244,7 @@ class SelectBox {
3239
3244
  });
3240
3245
  }
3241
3246
 
3242
- if (stickyGroup && stickyGroup.length > 0) {
3247
+ if (stickyGroup) {
3243
3248
  groups.unshift(stickyGroup);
3244
3249
  }
3245
3250
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielgindi/selectbox",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
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",