@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/dist/lib.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.117
2
+ * @danielgindi/selectbox 1.0.118
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  'use strict';
@@ -639,6 +639,22 @@ class DropList {
639
639
  return this;
640
640
  }
641
641
 
642
+ /**
643
+ * Replaces all current items with the supplied items
644
+ * @param {DropList.Item[]} items The items to set. These are copied.
645
+ * @returns {DropList}
646
+ */
647
+ setItems(items) {
648
+ const p = this._p;
649
+
650
+ p.items.length = 0;
651
+ p.groupCount = 0;
652
+
653
+ p.virtualListHelper.setCount(0);
654
+
655
+ return this.addItems(items);
656
+ }
657
+
642
658
  updateItemByValue(value, newItem) {
643
659
  const p = this._p;
644
660