@danielgindi/selectbox 2.0.2 → 2.0.4

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/css/droplist.css CHANGED
@@ -1,3 +1,3 @@
1
- .droplist_wrapper{box-sizing:border-box;z-index:10000;float:left;margin:0;padding:0;border:1px solid #b1b1b1;outline:0;border-radius:5px;background:#fff;max-height:300px;max-width:100%}.droplist_wrapper .droplist_header{position:relative;padding:.5em;box-sizing:inherit}.droplist_wrapper .droplist_header input[type=search]{box-sizing:inherit;width:100%}.droplist_wrapper.droplist__is_above{border-bottom-left-radius:0;border-bottom-right-radius:0;margin:1px 0 0 0}.droplist_wrapper.droplist__is_below{border-top-left-radius:0;border-top-right-radius:0;margin:-1px 0 0 0}.droplist_wrapper ul{list-style:none;margin:0;padding:0;border:0;overflow-y:auto;overflow-x:hidden;max-height:100%;max-width:100%;background:none}.droplist_wrapper ul li{box-sizing:border-box;position:relative;margin:0;padding:3px 11px 4px 11px;height:23px;font-size:13px;line-height:17px;color:#3e3f48;white-space:nowrap;cursor:pointer;width:100%;overflow:hidden}.droplist_wrapper ul li.droplist__item_focus{background-color:#3e3f48;color:#fff}.droplist_wrapper ul li .checkbox{position:absolute;left:6px;top:3px;display:block;width:16px;height:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23dae7f1;'%3E%3C/rect%3E%3C/svg%3E");background-size:100% 100%}.droplist_wrapper ul li:hover .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23fff;'%3E%3C/rect%3E%3C/svg%3E")}.droplist_wrapper ul li:active .checkbox,.droplist_wrapper ul li:hover:active .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %23396d93; fill: %23b5cfe3;'%3E%3C/rect%3E%3C/svg%3E")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23dae7f1;'%3E%3C/rect%3E%3Cpath fill='%236ca1c6' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:hover .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23fff;'%3E%3C/rect%3E%3Cpath fill='%236ca1c6' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:active .checkbox,.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:hover:active .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %23396d93; fill: %23b5cfe3;'%3E%3C/rect%3E%3Cpath fill='%23396d93' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_single.droplist__item_checked{opacity:.5}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck){padding:1px 6px 2px 2px}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label{display:block;margin:1px 0 0 24px}.droplist_wrapper ul li.droplist__item_group{font-weight:bold}.droplist_wrapper ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-left:15px}.droplist_wrapper ul li.droplist__item_child.droplist__item_single,.droplist_wrapper ul li.droplist__item_child.droplist__item_multi_nocheck{padding-left:24px}.droplist_wrapper ul li.droplist__item_nointeraction{cursor:default}.droplist_wrapper ul .droplist__no_results_content{text-align:center}.droplist_wrapper ul li .remove{display:none;position:absolute;top:0;right:2px;width:34px;height:20px;padding:0;border:0;background:none;line-height:20px;vertical-align:middle;text-align:center;direction:ltr;font-size:15px;cursor:pointer}.droplist_wrapper ul li .remove:before{display:inline-block;content:"x";color:#fff}.droplist_wrapper ul .droplist__item_focus .remove{display:block}.droplist_wrapper.droplist__rtl,[dir=rtl] .droplist_wrapper:not(.droplist__ltr){direction:rtl}.droplist_wrapper.droplist__rtl ul li .checkbox,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li .checkbox{left:auto;right:6px}.droplist_wrapper.droplist__rtl ul li.droplist__item_multi:not(.droplist__item_multi_nocheck),[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_multi:not(.droplist__item_multi_nocheck){padding:1px 2px 2px 6px}.droplist_wrapper.droplist__rtl ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label{margin:1px 24px 0 0}.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck),[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-left:6px;padding-right:15px}.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_single,.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_multi_nocheck,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_single,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_multi_nocheck{padding-left:11px;padding-right:24px}.droplist_wrapper.droplist__rtl ul li .remove,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li .remove{right:auto;left:2px}.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}
1
+ .droplist_wrapper{box-sizing:border-box;z-index:10000;float:left;margin:0;padding:0;border:1px solid #b1b1b1;outline:0;border-radius:5px;background:#fff;max-height:300px;max-width:100%}.droplist_wrapper .droplist_header{position:relative;padding:.5em;box-sizing:inherit}.droplist_wrapper .droplist_header input[type=search]{box-sizing:inherit;width:100%}.droplist_wrapper.droplist__is_above{border-bottom-left-radius:0;border-bottom-right-radius:0;margin:1px 0 0 0}.droplist_wrapper.droplist__is_below{border-top-left-radius:0;border-top-right-radius:0;margin:-1px 0 0 0}.droplist_wrapper ul{position:relative;list-style:none;margin:0;padding:0;border:0;overflow-y:auto;overflow-x:hidden;max-height:100%;max-width:100%;background:none}.droplist_wrapper ul li{box-sizing:border-box;position:relative;margin:0;padding:3px 11px 4px 11px;height:23px;font-size:13px;line-height:17px;color:#3e3f48;white-space:nowrap;cursor:pointer;width:100%;overflow:hidden}.droplist_wrapper ul li.droplist__item_focus{background-color:#3e3f48;color:#fff}.droplist_wrapper ul li .checkbox{position:absolute;left:6px;top:3px;display:block;width:16px;height:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23dae7f1;'%3E%3C/rect%3E%3C/svg%3E");background-size:100% 100%}.droplist_wrapper ul li:hover .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23fff;'%3E%3C/rect%3E%3C/svg%3E")}.droplist_wrapper ul li:active .checkbox,.droplist_wrapper ul li:hover:active .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %23396d93; fill: %23b5cfe3;'%3E%3C/rect%3E%3C/svg%3E")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23dae7f1;'%3E%3C/rect%3E%3Cpath fill='%236ca1c6' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:hover .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23fff;'%3E%3C/rect%3E%3Cpath fill='%236ca1c6' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:active .checkbox,.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:hover:active .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %23396d93; fill: %23b5cfe3;'%3E%3C/rect%3E%3Cpath fill='%23396d93' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_single.droplist__item_checked{opacity:.5}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck){padding:1px 6px 2px 2px}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label{display:block;margin:1px 0 0 24px}.droplist_wrapper ul li.droplist__item_group{font-weight:bold}.droplist_wrapper ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-left:15px}.droplist_wrapper ul li.droplist__item_child.droplist__item_single,.droplist_wrapper ul li.droplist__item_child.droplist__item_multi_nocheck{padding-left:24px}.droplist_wrapper ul li.droplist__item_nointeraction{cursor:default}.droplist_wrapper ul .droplist__no_results_content{text-align:center}.droplist_wrapper ul li .remove{display:none;position:absolute;top:0;right:2px;width:34px;height:20px;padding:0;border:0;background:none;line-height:20px;vertical-align:middle;text-align:center;direction:ltr;font-size:15px;cursor:pointer}.droplist_wrapper ul li .remove:before{display:inline-block;content:"x";color:#fff}.droplist_wrapper ul .droplist__item_focus .remove{display:block}.droplist_wrapper.droplist__rtl,[dir=rtl] .droplist_wrapper:not(.droplist__ltr){direction:rtl}.droplist_wrapper.droplist__rtl ul li .checkbox,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li .checkbox{left:auto;right:6px}.droplist_wrapper.droplist__rtl ul li.droplist__item_multi:not(.droplist__item_multi_nocheck),[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_multi:not(.droplist__item_multi_nocheck){padding:1px 2px 2px 6px}.droplist_wrapper.droplist__rtl ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label{margin:1px 24px 0 0}.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck),[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-left:6px;padding-right:15px}.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_single,.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_multi_nocheck,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_single,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_multi_nocheck{padding-left:11px;padding-right:24px}.droplist_wrapper.droplist__rtl ul li .remove,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li .remove{right:auto;left:2px}.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}
2
2
 
3
3
  /*# sourceMappingURL=droplist.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../scss/droplist.scss"],"names":[],"mappings":"AAAA,kBACC,sBACA,cACA,WACA,SACA,UACA,yBACA,UACA,kBACA,gBACA,iBACA,eAEA,mCACC,kBACA,aACA,mBAEA,sDACC,mBACA,WAIF,qCACC,4BACA,6BACA,iBAGD,qCACC,yBACA,0BACA,kBAGD,qBACC,gBACA,SACA,UACA,SACA,gBACA,kBACA,gBACA,eACA,gBAEA,wBACC,sBACA,kBACA,SACA,0BACA,YACA,eACA,iBACA,cACA,mBACA,eAIA,WACA,gBAEA,6CAEC,yBACA,WAKD,kCACC,kBACA,SACA,QACA,cACA,WACA,YAGA,4PACA,0BAGD,wCAEC,yPAGD,wFAGC,4PAKD,8EAEC,+jBAGD,oFAEC,4jBAGD,gLAGC,+jBAIF,qEACC,WAGD,gFACC,wBAEA,sGACC,cACA,oBAIF,6CACC,iBAGD,qGACC,kBAGD,6IAEC,kBAGD,qDACC,eAGD,mDACC,kBAGD,gCACC,aACA,kBACA,MACA,UACA,WACA,YACA,UACA,SACA,gBACA,iBACA,sBACA,kBACA,cACA,eACA,eAEA,uCACC,qBACA,YACA,WAIF,mDACC,cAIF,gFAEC,cAMC,gHACC,UACA,UAIF,4MACC,wBAEA,wPACC,oBAIF,sPACC,iBACA,mBAGD,kXAEC,kBACA,mBAGD,4GACC,WACA,SAKH,oBACI,yBACA,0BAGJ,oBACI,4BACA","file":"droplist.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../scss/droplist.scss"],"names":[],"mappings":"AAAA,kBACC,sBACA,cACA,WACA,SACA,UACA,yBACA,UACA,kBACA,gBACA,iBACA,eAEA,mCACC,kBACA,aACA,mBAEA,sDACC,mBACA,WAIF,qCACC,4BACA,6BACA,iBAGD,qCACC,yBACA,0BACA,kBAGD,qBACC,kBACA,gBACA,SACA,UACA,SACA,gBACA,kBACA,gBACA,eACA,gBAEA,wBACC,sBACA,kBACA,SACA,0BACA,YACA,eACA,iBACA,cACA,mBACA,eAIA,WACA,gBAEA,6CAEC,yBACA,WAKD,kCACC,kBACA,SACA,QACA,cACA,WACA,YAGA,4PACA,0BAGD,wCAEC,yPAGD,wFAGC,4PAKD,8EAEC,+jBAGD,oFAEC,4jBAGD,gLAGC,+jBAIF,qEACC,WAGD,gFACC,wBAEA,sGACC,cACA,oBAIF,6CACC,iBAGD,qGACC,kBAGD,6IAEC,kBAGD,qDACC,eAGD,mDACC,kBAGD,gCACC,aACA,kBACA,MACA,UACA,WACA,YACA,UACA,SACA,gBACA,iBACA,sBACA,kBACA,cACA,eACA,eAEA,uCACC,qBACA,YACA,WAIF,mDACC,cAIF,gFAEC,cAMC,gHACC,UACA,UAIF,4MACC,wBAEA,wPACC,oBAIF,sPACC,iBACA,mBAGD,kXAEC,kBACA,mBAGD,4GACC,WACA,SAKH,oBACI,yBACA,0BAGJ,oBACI,4BACA","file":"droplist.css"}
package/dist/lib.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 2.0.2
2
+ * @danielgindi/selectbox 2.0.4
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  'use strict';
@@ -682,7 +682,8 @@ class DropList {
682
682
  const p = this._p;
683
683
 
684
684
  if (this.hasFocusedItem() && p.multi) {
685
- let item = p.items[p.focusItemIndex];
685
+ const items = p.filteredItems ?? p.items;
686
+ let item = items[p.focusItemIndex];
686
687
  if (item._nocheck || item._nointeraction) return this;
687
688
 
688
689
  item._checked = !item._checked;
@@ -750,7 +751,7 @@ class DropList {
750
751
  const p = this._p,labelProp = p.labelProp,valueProp = p.valueProp;
751
752
 
752
753
  let isMulti = p.multi;
753
- let items = p.items;
754
+ const items = p.items;
754
755
 
755
756
  if (atIndex == null || atIndex < 0 || atIndex >= p.items.length) {
756
757
  atIndex = -1;
@@ -1260,7 +1261,7 @@ class DropList {
1260
1261
  p.filteredItems = null;
1261
1262
  }
1262
1263
 
1263
- this.needsRefilter = false;
1264
+ p.needsRefilter = false;
1264
1265
 
1265
1266
  const items = p.filteredItems ?? p.items;
1266
1267
  p.hasNoResultsItem = items.length === 0 && !!p.noResultsText;
@@ -1281,11 +1282,17 @@ class DropList {
1281
1282
  return this;
1282
1283
  }
1283
1284
 
1284
- getFilteredItemCount() {
1285
+ rushRefilter() {
1285
1286
  const p = this._p;
1286
-
1287
1287
  if (p.needsRefilter)
1288
1288
  this._refilterItems();
1289
+ return this;
1290
+ }
1291
+
1292
+ getFilteredItemCount() {
1293
+ const p = this._p;
1294
+
1295
+ this.rushRefilter();
1289
1296
 
1290
1297
  if (p.filteredItems)
1291
1298
  return p.filteredItems.length;
@@ -1731,6 +1738,8 @@ class DropList {
1731
1738
  setCheckedValues(values) {
1732
1739
  const p = this._p;
1733
1740
 
1741
+ this.rushRefilter();
1742
+
1734
1743
  let groupIndexes = [];
1735
1744
 
1736
1745
  for (let i = 0, count = p.items.length; i < count; i++) {
@@ -1794,7 +1803,7 @@ class DropList {
1794
1803
 
1795
1804
  excludeGroups = excludeGroups && p.groupCount > 0;
1796
1805
 
1797
- let items = [];
1806
+ const items = [];
1798
1807
 
1799
1808
  for (let i = 0, count = p.items.length; i < count; i++) {
1800
1809
  let item = p.items[i];
@@ -1835,9 +1844,7 @@ class DropList {
1835
1844
  }
1836
1845
  });
1837
1846
 
1838
- if (p.needsRefilter) {
1839
- this._refilterItems();
1840
- }
1847
+ this.rushRefilter();
1841
1848
 
1842
1849
  const el = p.el;
1843
1850
  el.style.position = 'absolute';
@@ -2045,6 +2052,8 @@ class DropList {
2045
2052
  setFocusedItemAtIndex(itemIndex) {
2046
2053
  const p = this._p;
2047
2054
 
2055
+ this.rushRefilter();
2056
+
2048
2057
  if (p.filteredItems) {
2049
2058
  const item = p.items[itemIndex];
2050
2059
  itemIndex = p.items.indexOf(item);
@@ -2242,6 +2251,8 @@ class DropList {
2242
2251
  setSingleSelectedItemAtIndex(itemIndex) {
2243
2252
  const p = this._p;
2244
2253
 
2254
+ this.rushRefilter();
2255
+
2245
2256
  let itemEl = null;
2246
2257
 
2247
2258
  if (itemIndex > -1 && !p.items[itemIndex]._nointeraction) {
@@ -3001,7 +3012,7 @@ class DropList {
3001
3012
  let affectedItems = 0;
3002
3013
 
3003
3014
  if (p.autoCheckGroupChildren) {
3004
- let items = p.filteredItems ?? p.items;
3015
+ const items = p.filteredItems ?? p.items;
3005
3016
  let groupIndex = items.indexOf(item);
3006
3017
 
3007
3018
  for (let i = groupIndex + 1, len = items.length; i < len; i++) {
@@ -3044,7 +3055,7 @@ class DropList {
3044
3055
  affectedItems: affectedItems
3045
3056
  });
3046
3057
  } else if (p.groupCount > 0 && p.autoCheckGroupChildren) {
3047
- let items = p.filteredItems ?? p.items;
3058
+ const items = p.filteredItems ?? p.items;
3048
3059
  let itemIndex = items.indexOf(item);
3049
3060
  let groupIndex = -1;
3050
3061
 
@@ -3070,7 +3081,7 @@ class DropList {
3070
3081
  if (!(p.multi && p.autoCheckGroupChildren && groupIndex > -1))
3071
3082
  return this;
3072
3083
 
3073
- let items = p.filteredItems ?? p.items;
3084
+ const items = p.filteredItems ?? p.items;
3074
3085
  let groupItem = items[groupIndex];
3075
3086
 
3076
3087
  if (!groupItem || !groupItem._group) return this;
@@ -3196,7 +3207,7 @@ class DropList {
3196
3207
  _determineVirtualMode(targetItemCount) {
3197
3208
  const p = this._p;
3198
3209
 
3199
- let items = p.filteredItems ?? p.items;
3210
+ const items = p.filteredItems ?? p.items;
3200
3211
  if (targetItemCount === undefined) {
3201
3212
  targetItemCount = items.length;
3202
3213
  }
@@ -5570,6 +5581,7 @@ class SelectBox {
5570
5581
  p.splitListCheckedGroups);
5571
5582
  }
5572
5583
  dropList.setItems(items);
5584
+ dropList.invokeRefilter();
5573
5585
  p.itemsChanged = false;
5574
5586
  p.selectionChanged = true;
5575
5587
  p.resortBySelectionNeeded = false;