@danielgindi/selectbox 1.0.116 → 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.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.116
2
+ * @danielgindi/selectbox 1.0.118
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  (function (global, factory) {
@@ -635,6 +635,22 @@
635
635
  return this;
636
636
  }
637
637
 
638
+ /**
639
+ * Replaces all current items with the supplied items
640
+ * @param {DropList.Item[]} items The items to set. These are copied.
641
+ * @returns {DropList}
642
+ */
643
+ setItems(items) {
644
+ const p = this._p;
645
+
646
+ p.items.length = 0;
647
+ p.groupCount = 0;
648
+
649
+ p.virtualListHelper.setCount(0);
650
+
651
+ return this.addItems(items);
652
+ }
653
+
638
654
  updateItemByValue(value, newItem) {
639
655
  const p = this._p;
640
656
 
@@ -716,6 +732,20 @@
716
732
  return this;
717
733
  }
718
734
 
735
+ /**
736
+ * Should only be used if the items array has been manually manipulated.
737
+ * @return {DropList}
738
+ */
739
+ invalidate() {
740
+ const p = this._p;
741
+
742
+ p.virtualListHelper.
743
+ invalidate().
744
+ render();
745
+
746
+ return this;
747
+ }
748
+
719
749
  itemDataByValue(value) {
720
750
  const p = this._p;
721
751