@syncfusion/ej2-dropdowns 20.1.47 → 20.1.50

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.
@@ -88,6 +88,7 @@ function Search(inputVal, items, searchType, ignoreCase) {
88
88
  if (inputVal && inputVal.length) {
89
89
  var strLength = inputVal.length;
90
90
  var queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;
91
+ queryStr = escapeCharRegExp(queryStr);
91
92
  for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {
92
93
  var item = itemsData[i];
93
94
  var text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
@@ -101,6 +102,9 @@ function Search(inputVal, items, searchType, ignoreCase) {
101
102
  }
102
103
  return itemData;
103
104
  }
105
+ function escapeCharRegExp(value) {
106
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
107
+ }
104
108
  function resetIncrementalSearchValues(elementId) {
105
109
  if (prevElementId === elementId) {
106
110
  prevElementId = '';
@@ -11243,7 +11247,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11243
11247
  if (this.mainList && this.ulElement) {
11244
11248
  var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
11245
11249
  var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
11246
- var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
11250
+ var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
11247
11251
  if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
11248
11252
  //EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
11249
11253
  this.mainList = this.ulElement;
@@ -15094,7 +15098,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15094
15098
  }
15095
15099
  }
15096
15100
  }
15097
- else if (e.keyCode !== 37 && e.keyCode !== 39) {
15101
+ else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== "KeyA") {
15098
15102
  this.upDownKeyHandler(e);
15099
15103
  }
15100
15104
  }
@@ -15123,9 +15127,6 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15123
15127
  }
15124
15128
  }
15125
15129
  removeClass([fli], 'e-focused');
15126
- if (e.ctrlKey && !e.shiftKey && !this.selectionSettings.showCheckbox) {
15127
- removeClass([fli], 'e-selected');
15128
- }
15129
15130
  }
15130
15131
  var cli = ul.children[fliIdx];
15131
15132
  if (cli) {
@@ -15729,5 +15730,5 @@ var listBoxClasses = {
15729
15730
  * export all modules from current location
15730
15731
  */
15731
15732
 
15732
- export { incrementalSearch, Search, resetIncrementalSearchValues, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, encodePlaceholder, SelectionSettings, ToolbarSettings, ListBox };
15733
+ export { incrementalSearch, Search, escapeCharRegExp, resetIncrementalSearchValues, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, encodePlaceholder, SelectionSettings, ToolbarSettings, ListBox };
15733
15734
  //# sourceMappingURL=ej2-dropdowns.es5.js.map