@energycap/components 0.38.5 → 0.38.6-ECAP-18423-Enhanced-Unit-Comboboxes-Part2.20231019-1507

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.
@@ -2873,7 +2873,7 @@ class ComboboxComponent extends FormControlBase {
2873
2873
  }
2874
2874
  /**
2875
2875
 
2876
- * Filter array of options by label (contains)
2876
+ * Filter array of options by label or caption (contains)
2877
2877
  *
2878
2878
  * @param filterText The value of textbox that we will filter our options by
2879
2879
  *
@@ -2883,7 +2883,8 @@ class ComboboxComponent extends FormControlBase {
2883
2883
  let searchText = filterText.toLowerCase();
2884
2884
  if (filterText && filterText !== '') {
2885
2885
  return this.options.filter(item => {
2886
- return item.label.toLowerCase().indexOf(searchText) >= 0;
2886
+ return item.label.toLowerCase().indexOf(searchText) >= 0 ||
2887
+ (item.caption && item.caption.toLowerCase().indexOf(searchText) >= 0);
2887
2888
  });
2888
2889
  }
2889
2890
  else {