@danielgindi/selectbox 1.0.117 → 1.0.118

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/DropList.js CHANGED
@@ -654,6 +654,22 @@ class DropList {
654
654
  return this;
655
655
  }
656
656
 
657
+ /**
658
+ * Replaces all current items with the supplied items
659
+ * @param {DropList.Item[]} items The items to set. These are copied.
660
+ * @returns {DropList}
661
+ */
662
+ setItems(items) {
663
+ const p = this._p;
664
+
665
+ p.items.length = 0;
666
+ p.groupCount = 0;
667
+
668
+ p.virtualListHelper.setCount(0);
669
+
670
+ return this.addItems(items);
671
+ }
672
+
657
673
  updateItemByValue(value, newItem) {
658
674
  const p = this._p;
659
675
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielgindi/selectbox",
3
- "version": "1.0.117",
3
+ "version": "1.0.118",
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",