@bmlt-enabled/croutonjs 3.17.5 → 3.17.7

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/crouton.js CHANGED
@@ -15710,12 +15710,17 @@ Crouton.prototype.render = function() {
15710
15710
  minimumResultsForSearch: 1,
15711
15711
  dropdownCssClass: 'bmlt-drop',
15712
15712
  matcher: function(params, data) {
15713
+ if (data.id === "a-")
15714
+ return data;
15713
15715
  elementId = data.element.parentElement.id;
15716
+ if (params.hasOwnProperty('term')) {
15717
+ if (data.text.toUpperCase().indexOf(params.term.toUpperCase()) < 0)
15718
+ return null;
15719
+ }
15714
15720
  dropdown = self.dropdownData.find((dropdown) => dropdown.elementId === elementId);
15715
15721
  if (typeof dropdown === 'undefined')
15716
15722
  return data;
15717
- if (data.id === "a-")
15718
- return data;
15723
+
15719
15724
  if (typeof dropdown.optionsShowing === 'undefined')
15720
15725
  return data;
15721
15726
  if (dropdown.optionsShowing.includes(data.text))