@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.
- package/CHANGELOG.md +8 -0
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +8 -7
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +7 -6
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/common/incremental-search.d.ts +1 -0
- package/src/common/incremental-search.js +4 -0
- package/src/list-box/list-box.js +1 -4
- package/src/multi-select/multi-select.js +1 -1
|
@@ -87,7 +87,8 @@ function Search(inputVal, items, searchType, ignoreCase) {
|
|
|
87
87
|
const itemData = { item: null, index: null };
|
|
88
88
|
if (inputVal && inputVal.length) {
|
|
89
89
|
const strLength = inputVal.length;
|
|
90
|
-
|
|
90
|
+
let queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;
|
|
91
|
+
queryStr = escapeCharRegExp(queryStr);
|
|
91
92
|
for (let i = 0, itemsData = listItems; i < itemsData.length; i++) {
|
|
92
93
|
const item = itemsData[i];
|
|
93
94
|
const 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 = '';
|
|
@@ -11081,7 +11085,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11081
11085
|
if (this.mainList && this.ulElement) {
|
|
11082
11086
|
let isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
11083
11087
|
let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
11084
|
-
let 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));
|
|
11088
|
+
let 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));
|
|
11085
11089
|
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
11086
11090
|
//EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|
|
11087
11091
|
this.mainList = this.ulElement;
|
|
@@ -14869,7 +14873,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
14869
14873
|
}
|
|
14870
14874
|
}
|
|
14871
14875
|
}
|
|
14872
|
-
else if (e.keyCode !== 37 && e.keyCode !== 39) {
|
|
14876
|
+
else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== "KeyA") {
|
|
14873
14877
|
this.upDownKeyHandler(e);
|
|
14874
14878
|
}
|
|
14875
14879
|
}
|
|
@@ -14898,9 +14902,6 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
14898
14902
|
}
|
|
14899
14903
|
}
|
|
14900
14904
|
removeClass([fli], 'e-focused');
|
|
14901
|
-
if (e.ctrlKey && !e.shiftKey && !this.selectionSettings.showCheckbox) {
|
|
14902
|
-
removeClass([fli], 'e-selected');
|
|
14903
|
-
}
|
|
14904
14905
|
}
|
|
14905
14906
|
const cli = ul.children[fliIdx];
|
|
14906
14907
|
if (cli) {
|
|
@@ -15492,5 +15493,5 @@ const listBoxClasses = {
|
|
|
15492
15493
|
* export all modules from current location
|
|
15493
15494
|
*/
|
|
15494
15495
|
|
|
15495
|
-
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 };
|
|
15496
|
+
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 };
|
|
15496
15497
|
//# sourceMappingURL=ej2-dropdowns.es2015.js.map
|