@syncfusion/ej2-dropdowns 20.1.50 → 20.1.55

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.
@@ -92,7 +92,7 @@ function Search(inputVal, items, searchType, ignoreCase) {
92
92
  for (let i = 0, itemsData = listItems; i < itemsData.length; i++) {
93
93
  const item = itemsData[i];
94
94
  const text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
95
- if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr, "g").test(text))) {
95
+ if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr, 'g').test(text))) {
96
96
  itemData.item = item;
97
97
  itemData.index = i;
98
98
  return { item: item, index: i };
@@ -308,7 +308,8 @@ let DropDownBase = class DropDownBase extends Component {
308
308
  compareValue = value;
309
309
  dataSource.filter((item) => {
310
310
  const itemValue = getValue(fields.value, item);
311
- if (!isNullOrUndefined(itemValue) && !isNullOrUndefined(value) && itemValue.toString() === compareValue.toString()) {
311
+ if (!isNullOrUndefined(itemValue) && !isNullOrUndefined(value)
312
+ && itemValue.toString() === compareValue.toString()) {
312
313
  value = getValue(fields.text, item);
313
314
  }
314
315
  });
@@ -731,7 +732,7 @@ let DropDownBase = class DropDownBase extends Component {
731
732
  if (this.getModuleName() === 'multiselect' && this.properties.allowCustomValue && this.fields.groupBy) {
732
733
  for (let i = 0; i < ulElement.childElementCount; i++) {
733
734
  if (ulElement.children[i].classList.contains('e-list-group-item')) {
734
- if (isNullOrUndefined(ulElement.children[i].innerHTML) || ulElement.children[i].innerHTML == "") {
735
+ if (isNullOrUndefined(ulElement.children[i].innerHTML) || ulElement.children[i].innerHTML === '') {
735
736
  addClass([ulElement.children[i]], HIDE_GROUPLIST);
736
737
  }
737
738
  }
@@ -858,8 +859,8 @@ let DropDownBase = class DropDownBase extends Component {
858
859
  this.scrollStop(e);
859
860
  }
860
861
  scrollStop(e) {
861
- let target = !isNullOrUndefined(e) ? e.target : this.list;
862
- let liHeight = parseInt(getComputedStyle(this.getValidLi(), null).getPropertyValue('height'), 10);
862
+ const target = !isNullOrUndefined(e) ? e.target : this.list;
863
+ const liHeight = parseInt(getComputedStyle(this.getValidLi(), null).getPropertyValue('height'), 10);
863
864
  const topIndex = Math.round(target.scrollTop / liHeight);
864
865
  const liCollections = this.list.querySelectorAll('li' + ':not(.e-hide-listitem)');
865
866
  for (let i = topIndex; i > -1; i--) {
@@ -947,10 +948,10 @@ let DropDownBase = class DropDownBase extends Component {
947
948
  Refer bug report https://bugzilla.mozilla.org/show_bug.cgi?id=137688
948
949
  Refer alternate solution https://stackoverflow.com/a/41696234/9133493*/
949
950
  if (isNaN(borderWidth)) {
950
- let borderTopWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-top-width'), 10);
951
- let borderBottomWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-bottom-width'), 10);
952
- let borderLeftWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-left-width'), 10);
953
- let borderRightWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-right-width'), 10);
951
+ const borderTopWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-top-width'), 10);
952
+ const borderBottomWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-bottom-width'), 10);
953
+ const borderLeftWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-left-width'), 10);
954
+ const borderRightWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-right-width'), 10);
954
955
  borderWidth = (borderTopWidth + borderBottomWidth + borderLeftWidth + borderRightWidth);
955
956
  }
956
957
  }
@@ -1034,6 +1035,7 @@ let DropDownBase = class DropDownBase extends Component {
1034
1035
  dataSource = this.selectData;
1035
1036
  }
1036
1037
  }
1038
+ dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length ? this.selectData : dataSource;
1037
1039
  this.setListData(dataSource, fields, query);
1038
1040
  }
1039
1041
  }
@@ -1216,7 +1218,8 @@ let DropDownBase = class DropDownBase extends Component {
1216
1218
  }
1217
1219
  if (this.itemTemplate && !isHeader) {
1218
1220
  const itemCheck = this.templateCompiler(this.itemTemplate);
1219
- const compiledString = itemCheck ? compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
1221
+ const compiledString = itemCheck ?
1222
+ compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
1220
1223
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1221
1224
  const addItemTemplate = compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate, null, li);
1222
1225
  if (addItemTemplate) {
@@ -2387,9 +2390,9 @@ let DropDownList = class DropDownList extends DropDownBase {
2387
2390
  detach(this.valueTempElement);
2388
2391
  this.inputElement.style.display = 'block';
2389
2392
  }
2390
- let clearIcon = dropDownListClasses.clearIcon;
2391
- let isFilterElement = this.isFiltering() && this.filterInput && (this.getModuleName() === 'combobox');
2392
- let clearElement = isFilterElement && this.filterInput.parentElement.querySelector('.' + clearIcon);
2393
+ const clearIcon = dropDownListClasses.clearIcon;
2394
+ const isFilterElement = this.isFiltering() && this.filterInput && (this.getModuleName() === 'combobox');
2395
+ const clearElement = isFilterElement && this.filterInput.parentElement.querySelector('.' + clearIcon);
2393
2396
  if (this.isFiltering() && clearElement) {
2394
2397
  clearElement.style.removeProperty('visibility');
2395
2398
  }
@@ -3894,7 +3897,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3894
3897
  if (!this.enabled) {
3895
3898
  return;
3896
3899
  }
3897
- if (this.isFiltering() && this.dataSource instanceof DataManager && (this.actionData.list != this.actionCompleteData.list) &&
3900
+ if (this.isFiltering() && this.dataSource instanceof DataManager && (this.actionData.list !== this.actionCompleteData.list) &&
3898
3901
  this.actionData.list && this.actionData.ulElement) {
3899
3902
  this.actionCompleteData = this.actionData;
3900
3903
  this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, true);
@@ -5489,7 +5492,7 @@ let DropDownTree = class DropDownTree extends Component {
5489
5492
  }
5490
5493
  else {
5491
5494
  if (this.showCheckBox) {
5492
- let difference = this.value.filter((e) => {
5495
+ const difference = this.value.filter((e) => {
5493
5496
  return this.treeObj.checkedNodes.indexOf(e) === -1;
5494
5497
  });
5495
5498
  if (difference.length > 0 || this.treeSettings.autoCheck) {
@@ -6252,7 +6255,7 @@ let DropDownTree = class DropDownTree extends Component {
6252
6255
  }
6253
6256
  else if (this.treeDataType === 1) {
6254
6257
  for (let i = 0, objlen = this.treeItems.length; i < objlen; i++) {
6255
- let dataId = getValue(this.fields.value, this.treeItems[i]);
6258
+ const dataId = getValue(this.fields.value, this.treeItems[i]);
6256
6259
  if (!isNullOrUndefined(this.treeItems[i]) && !isNullOrUndefined(dataId) && dataId.toString() === id) {
6257
6260
  return this.treeItems[i];
6258
6261
  }
@@ -6269,19 +6272,19 @@ let DropDownTree = class DropDownTree extends Component {
6269
6272
  return newChildItems;
6270
6273
  }
6271
6274
  for (let i = 0, objlen = obj.length; i < objlen; i++) {
6272
- let dataValue = getValue(mapper.value, obj[i]);
6275
+ const dataValue = getValue(mapper.value, obj[i]);
6273
6276
  if (obj[i] && dataValue && dataValue.toString() === id) {
6274
6277
  return obj[i];
6275
6278
  }
6276
6279
  else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[i]))) {
6277
- let childNodeData = getValue(mapper.child, obj[i]);
6280
+ const childNodeData = getValue(mapper.child, obj[i]);
6278
6281
  newChildItems = this.getChildNodeData(childNodeData, this.getChildMapperFields(mapper), id);
6279
6282
  if (newChildItems !== undefined) {
6280
6283
  break;
6281
6284
  }
6282
6285
  }
6283
6286
  else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[i]))) {
6284
- let child = 'child';
6287
+ const child = 'child';
6285
6288
  newChildItems = this.getChildNodeData(getValue(child, obj[i]), this.getChildMapperFields(mapper), id);
6286
6289
  if (newChildItems !== undefined) {
6287
6290
  break;
@@ -6400,7 +6403,7 @@ let DropDownTree = class DropDownTree extends Component {
6400
6403
  addClass([this.inputWrapper], SHOW_CHIP);
6401
6404
  }
6402
6405
  const chip = this.createElement('span', {
6403
- className: CHIP,
6406
+ className: CHIP
6404
6407
  });
6405
6408
  if (!this.inputEle.classList.contains(CHIP_INPUT)) {
6406
6409
  addClass([this.inputEle], CHIP_INPUT);
@@ -6536,7 +6539,7 @@ let DropDownTree = class DropDownTree extends Component {
6536
6539
  this.ensurePlaceHolder();
6537
6540
  }
6538
6541
  resetValue(isDynamicChange) {
6539
- if (this.value == [] && this.text == null) {
6542
+ if (this.value === [] && this.text === null) {
6540
6543
  return;
6541
6544
  }
6542
6545
  Input.setValue(null, this.inputEle, this.floatLabelType);
@@ -6917,10 +6920,10 @@ let DropDownTree = class DropDownTree extends Component {
6917
6920
  this.updateTreeSettings(newProp);
6918
6921
  break;
6919
6922
  case 'customTemplate':
6920
- if (this.mode !== "Custom") {
6923
+ if (this.mode !== 'Custom') {
6921
6924
  return;
6922
6925
  }
6923
- this.chipCollection.innerHTML = "";
6926
+ this.chipCollection.innerHTML = '';
6924
6927
  this.setTagValues();
6925
6928
  break;
6926
6929
  case 'sortOrder':
@@ -7138,7 +7141,7 @@ __decorate$2([
7138
7141
  Property('')
7139
7142
  ], DropDownTree.prototype, "cssClass", void 0);
7140
7143
  __decorate$2([
7141
- Property("${value.length} item(s) selected")
7144
+ Property('${value.length} item(s) selected')
7142
7145
  ], DropDownTree.prototype, "customTemplate", void 0);
7143
7146
  __decorate$2([
7144
7147
  Property(',')
@@ -7599,7 +7602,7 @@ let ComboBox = class ComboBox extends DropDownList {
7599
7602
  }
7600
7603
  }
7601
7604
  if (!this.isAndroidAutoFill(currentValue)) {
7602
- this.setAutoFillSelection(currentValue);
7605
+ this.setAutoFillSelection(currentValue, isHover);
7603
7606
  }
7604
7607
  }
7605
7608
  }
@@ -7667,7 +7670,7 @@ let ComboBox = class ComboBox extends DropDownList {
7667
7670
  e.preventDefault();
7668
7671
  }
7669
7672
  }
7670
- setAutoFillSelection(currentValue) {
7673
+ setAutoFillSelection(currentValue, isKeyNavigate = false) {
7671
7674
  const selection = this.getSelectionPoints();
7672
7675
  const value = this.inputElement.value.substr(0, selection.start);
7673
7676
  if (value && (value.toLowerCase() === currentValue.substr(0, selection.start).toLowerCase())) {
@@ -7675,7 +7678,7 @@ let ComboBox = class ComboBox extends DropDownList {
7675
7678
  Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton);
7676
7679
  this.inputElement.setSelectionRange(selection.start, this.inputElement.value.length);
7677
7680
  }
7678
- else {
7681
+ else if (isKeyNavigate) {
7679
7682
  Input.setValue(currentValue, this.inputElement, this.floatLabelType, this.showClearButton);
7680
7683
  this.inputElement.setSelectionRange(0, this.inputElement.value.length);
7681
7684
  }
@@ -8292,7 +8295,9 @@ let AutoComplete = class AutoComplete extends ComboBox {
8292
8295
  this.setScrollPosition(e);
8293
8296
  if (this.autofill && this.isPopupOpen) {
8294
8297
  this.preventAutoFill = false;
8295
- super.setAutoFill(li);
8298
+ const isKeyNavigate = (e && e.action === 'down' || e.action === 'up' ||
8299
+ e.action === 'home' || e.action === 'end' || e.action === 'pageUp' || e.action === 'pageDown');
8300
+ super.setAutoFill(li, isKeyNavigate);
8296
8301
  }
8297
8302
  attributes(this.inputElement, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
8298
8303
  }
@@ -9185,7 +9190,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9185
9190
  }
9186
9191
  }
9187
9192
  getValidLi() {
9188
- let liElement = this.ulElement.querySelector('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');
9193
+ const liElement = this.ulElement.querySelector('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');
9189
9194
  return (!isNullOrUndefined(liElement) ? liElement : this.liCollections[0]);
9190
9195
  }
9191
9196
  checkSelectAll() {
@@ -9283,7 +9288,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9283
9288
  const list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
9284
9289
  if (this.backCommand) {
9285
9290
  this.remoteCustomValue = false;
9286
- if (this.allowCustomValue && list.querySelectorAll('li').length == 0 && this.mainData.length > 0) {
9291
+ if (this.allowCustomValue && list.querySelectorAll('li').length === 0 && this.mainData.length > 0) {
9287
9292
  this.mainData = [];
9288
9293
  }
9289
9294
  this.onActionComplete(list, this.mainData);
@@ -9675,10 +9680,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9675
9680
  if (!isNullOrUndefined(focusedItem)) {
9676
9681
  this.inputElement.setAttribute('aria-activedescendant', focusedItem.id);
9677
9682
  if (this.allowFiltering) {
9678
- var filterInput = this.popupWrapper.querySelector('.' + FILTERINPUT);
9683
+ const filterInput = this.popupWrapper.querySelector('.' + FILTERINPUT);
9679
9684
  filterInput && filterInput.setAttribute('aria-activedescendant', focusedItem.id);
9680
9685
  }
9681
- else if (this.mode == "CheckBox") {
9686
+ else if (this.mode === 'CheckBox') {
9682
9687
  this.overAllWrapper.setAttribute('aria-activedescendant', focusedItem.id);
9683
9688
  }
9684
9689
  }
@@ -10170,7 +10175,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
10170
10175
  this.expandTextbox();
10171
10176
  }
10172
10177
  removeAllItems(value, eve, isClearAll, element, mainElement) {
10173
- let index = this.value.indexOf(value);
10178
+ const index = this.value.indexOf(value);
10174
10179
  const removeVal = this.value.slice(0);
10175
10180
  removeVal.splice(index, 1);
10176
10181
  this.setProperties({ value: [].concat([], removeVal) }, true);
@@ -11083,9 +11088,14 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11083
11088
  }
11084
11089
  updateDataList() {
11085
11090
  if (this.mainList && this.ulElement) {
11086
- let isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
11087
- let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
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));
11091
+ const isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
11092
+ const isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 &&
11093
+ this.ulElement.children[0].childElementCount > 0) &&
11094
+ (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
11095
+ const isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0
11096
+ && !(this.ulElement.childElementCount < this.mainList.childElementCount)
11097
+ && (this.ulElement.children[0].childElementCount > 0
11098
+ || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
11089
11099
  if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
11090
11100
  //EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
11091
11101
  this.mainList = this.ulElement;
@@ -11493,7 +11503,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11493
11503
  */
11494
11504
  showSpinner() {
11495
11505
  if (isNullOrUndefined(this.spinnerElement)) {
11496
- let filterClear = this.filterParent && this.filterParent.querySelector('.e-clear-icon.e-icons');
11506
+ const filterClear = this.filterParent && this.filterParent.querySelector('.e-clear-icon.e-icons');
11497
11507
  if (this.overAllClear.style.display !== 'none' || filterClear) {
11498
11508
  this.spinnerElement = filterClear ? filterClear : this.overAllClear;
11499
11509
  }
@@ -11570,7 +11580,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11570
11580
  const raminElement = this.createElement('span', {
11571
11581
  className: REMAIN_WRAPPER$1
11572
11582
  });
11573
- let remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
11583
+ const remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
11574
11584
  raminElement.innerText = remainCompildTemp;
11575
11585
  this.viewWrapper.appendChild(raminElement);
11576
11586
  this.renderReactTemplates();
@@ -11650,8 +11660,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11650
11660
  viewWrapper.removeChild(viewWrapper.firstChild);
11651
11661
  }
11652
11662
  raminElement.innerHTML = '';
11653
- let remainTemp = remainContent.replace('${count}', remaining.toString());
11654
- let totalTemp = totalContent.replace('${count}', remaining.toString());
11663
+ const remainTemp = remainContent.replace('${count}', remaining.toString());
11664
+ const totalTemp = totalContent.replace('${count}', remaining.toString());
11655
11665
  raminElement.innerText = (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ? remainTemp : totalTemp;
11656
11666
  if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {
11657
11667
  viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER$1);
@@ -11839,9 +11849,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11839
11849
  else {
11840
11850
  for (let i = 0; i < li.length && i < count; i++) {
11841
11851
  this.removeHover();
11842
- let customVal = li[i].getAttribute('data-value');
11843
- let value = this.getFormattedValue(customVal);
11844
- let mainElement = this.mainList ? this.mainList.querySelectorAll(state ?
11852
+ const customVal = li[i].getAttribute('data-value');
11853
+ const value = this.getFormattedValue(customVal);
11854
+ const mainElement = this.mainList ? this.mainList.querySelectorAll(state ?
11845
11855
  'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
11846
11856
  'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')[i] : null;
11847
11857
  if (state) {
@@ -12104,7 +12114,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12104
12114
  break;
12105
12115
  case 'popupHeight':
12106
12116
  if (this.popupObj) {
12107
- let overAllHeight = parseInt(this.popupHeight, 10);
12117
+ const overAllHeight = parseInt(this.popupHeight, 10);
12108
12118
  if (this.popupHeight !== 'auto') {
12109
12119
  this.list.style.maxHeight = formatUnit(overAllHeight);
12110
12120
  this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
@@ -12142,23 +12152,21 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12142
12152
  this.renderPopup();
12143
12153
  }
12144
12154
  presentItemValue(ulElement) {
12145
- let valuecheck = [];
12155
+ const valuecheck = [];
12146
12156
  for (let i = 0; i < this.value.length; i++) {
12147
- let checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', this.value[i]);
12157
+ const checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', this.value[i]);
12148
12158
  if (!checkEle) {
12149
12159
  valuecheck.push(this.value[i]);
12150
12160
  }
12151
12161
  }
12152
12162
  return valuecheck;
12153
12163
  }
12154
- ;
12155
12164
  addNonPresentItems(valuecheck, ulElement, list, event) {
12156
12165
  this.dataSource.executeQuery(this.getForQuery(valuecheck)).then((e) => {
12157
12166
  this.addItem(e.result, list.length);
12158
12167
  this.updateActionList(ulElement, list, event);
12159
12168
  });
12160
12169
  }
12161
- ;
12162
12170
  updateVal(newProp, oldProp, prop) {
12163
12171
  if (!this.list) {
12164
12172
  this.onLoadSelect();
@@ -12171,7 +12179,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12171
12179
  if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
12172
12180
  valuecheck = this.presentItemValue(this.ulElement);
12173
12181
  }
12174
- if (prop == 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
12182
+ if (prop === 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
12175
12183
  && this.listData != null) {
12176
12184
  this.mainData = null;
12177
12185
  this.setDynValue = true;
@@ -13665,14 +13673,14 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
13665
13673
  triggerDrag(args) {
13666
13674
  let scrollParent;
13667
13675
  let boundRect;
13668
- let scrollMoved = 36;
13676
+ const scrollMoved = 36;
13669
13677
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13670
- let event = args.event;
13678
+ const event = args.event;
13671
13679
  let wrapper;
13672
- if (args.target && (args.target.classList.contains("e-listbox-wrapper") || args.target.classList.contains("e-list-item")
13673
- || args.target.classList.contains("e-filter-parent") || args.target.classList.contains("e-input-group"))) {
13674
- if (args.target.classList.contains("e-list-item") || args.target.classList.contains("e-filter-parent")
13675
- || args.target.classList.contains("e-input-group")) {
13680
+ if (args.target && (args.target.classList.contains('e-listbox-wrapper') || args.target.classList.contains('e-list-item')
13681
+ || args.target.classList.contains('e-filter-parent') || args.target.classList.contains('e-input-group'))) {
13682
+ if (args.target.classList.contains('e-list-item') || args.target.classList.contains('e-filter-parent')
13683
+ || args.target.classList.contains('e-input-group')) {
13676
13684
  wrapper = args.target.closest('.e-listbox-wrapper');
13677
13685
  }
13678
13686
  else {
@@ -13726,7 +13734,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
13726
13734
  const getArgs = this.getDragArgs({ target: args.droppedElement }, true);
13727
13735
  const sourceArgs = { previousData: this.dataSource };
13728
13736
  const destArgs = { previousData: listObj.dataSource };
13729
- let dragArgs = extend({}, getArgs, { target: args.target, source: { previousData: this.dataSource }, previousIndex: args.previousIndex, currentIndex: args.currentIndex });
13737
+ let dragArgs = extend({}, getArgs, { target: args.target, source: { previousData: this.dataSource },
13738
+ previousIndex: args.previousIndex, currentIndex: args.currentIndex });
13730
13739
  if (listObj !== this) {
13731
13740
  const sourceArgs1 = extend(sourceArgs, { currentData: this.listData });
13732
13741
  dragArgs = extend(dragArgs, { source: sourceArgs1, destination: destArgs });
@@ -13820,14 +13829,14 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
13820
13829
  currIdx++;
13821
13830
  });
13822
13831
  if (this.fields.groupBy) {
13823
- let sourceElem = this.renderItems(this.listData, this.fields);
13832
+ const sourceElem = this.renderItems(this.listData, this.fields);
13824
13833
  this.updateListItems(sourceElem, this.ulElement);
13825
13834
  this.setSelection();
13826
13835
  }
13827
13836
  if (listObj.sortOrder !== 'None' || this.selectionSettings.showCheckbox
13828
13837
  !== listObj.selectionSettings.showCheckbox || listObj.fields.groupBy || listObj.itemTemplate || this.itemTemplate) {
13829
13838
  const sortable = getComponent(ul, 'sortable');
13830
- let sourceElem = listObj.renderItems(listData, listObj.fields);
13839
+ const sourceElem = listObj.renderItems(listData, listObj.fields);
13831
13840
  listObj.updateListItems(sourceElem, ul);
13832
13841
  this.setSelection();
13833
13842
  if (sortable.placeHolderElement) {
@@ -13857,7 +13866,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
13857
13866
  }
13858
13867
  updateListItems(sourceElem, destElem) {
13859
13868
  const i = 0;
13860
- destElem.innerHTML = "";
13869
+ destElem.innerHTML = '';
13861
13870
  while (i < sourceElem.childNodes.length) {
13862
13871
  destElem.appendChild(sourceElem.childNodes[i]);
13863
13872
  }
@@ -13917,7 +13926,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
13917
13926
  enableItems(items, enable = true, isValue) {
13918
13927
  let li;
13919
13928
  items.forEach((item) => {
13920
- let text = item;
13929
+ const text = item;
13921
13930
  li = this.findListElement(this.list, 'li', 'data-value', isValue ? text : this.getValueByText(text));
13922
13931
  if (!li) {
13923
13932
  return;
@@ -14042,6 +14051,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14042
14051
  if (this.listData.length === 0) {
14043
14052
  this.l10nUpdate();
14044
14053
  }
14054
+ this.value = null;
14055
+ this.updateToolBarState();
14045
14056
  }
14046
14057
  /**
14047
14058
  * Gets the array of data Object that matches the given array of values.
@@ -14283,7 +14294,10 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14283
14294
  let filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
14284
14295
  if (this.allowFiltering) {
14285
14296
  const filterType = this.inputString === '' ? 'contains' : this.filterType;
14286
- const dataType = this.typeOfData(this.dataSource).typeof;
14297
+ let dataType = this.typeOfData(this.dataSource).typeof;
14298
+ if (dataType === null) {
14299
+ dataType = this.typeOfData(this.jsonData).typeof;
14300
+ }
14287
14301
  if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {
14288
14302
  filterQuery.where('', filterType, this.inputString, this.ignoreCase, this.ignoreAccent);
14289
14303
  }
@@ -14643,7 +14657,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14643
14657
  });
14644
14658
  if (isRefresh) {
14645
14659
  if (fListBox.fields.groupBy) {
14646
- let sourceElem = fListBox.renderItems(listData, fListBox.fields);
14660
+ const sourceElem = fListBox.renderItems(listData, fListBox.fields);
14647
14661
  fListBox.updateListItems(sourceElem, fListBox.ulElement);
14648
14662
  }
14649
14663
  else {
@@ -14676,7 +14690,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14676
14690
  tListBox.jsonData = tJsonData;
14677
14691
  tListBox.sortedData = tSortData;
14678
14692
  if (isRefresh) {
14679
- let sourceElem = tListBox.renderItems(tListData, tListBox.fields);
14693
+ const sourceElem = tListBox.renderItems(tListData, tListBox.fields);
14680
14694
  tListBox.updateListItems(sourceElem, tListBox.ulElement);
14681
14695
  tListBox.setSelection();
14682
14696
  fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
@@ -14765,7 +14779,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14765
14779
  tListBox.jsonData = jsonData;
14766
14780
  fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
14767
14781
  if (isRefresh) {
14768
- let sourceElem = tListBox.renderItems(listData, tListBox.fields);
14782
+ const sourceElem = tListBox.renderItems(listData, tListBox.fields);
14769
14783
  tListBox.updateListItems(sourceElem, tListBox.ulElement);
14770
14784
  this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
14771
14785
  }
@@ -14873,7 +14887,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14873
14887
  }
14874
14888
  }
14875
14889
  }
14876
- else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== "KeyA") {
14890
+ else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== 'KeyA') {
14877
14891
  this.upDownKeyHandler(e);
14878
14892
  }
14879
14893
  }
@@ -14916,9 +14930,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14916
14930
  this.selectHandler({ target: ul.children[fliIdx], ctrlKey: e.ctrlKey, shiftKey: e.shiftKey }, true);
14917
14931
  }
14918
14932
  if (this.selectionSettings.showCheckbox && e.ctrlKey && e.shiftKey && (e.keyCode === 36 || e.keyCode === 35)) {
14919
- let selectedidx = Array.prototype.indexOf.call(ul.children, fli);
14920
- let sidx = e.code === "Home" ? 0 : selectedidx;
14921
- let eidx = e.code === "Home" ? selectedidx : ul.children.length - 1;
14933
+ const selectedidx = Array.prototype.indexOf.call(ul.children, fli);
14934
+ const sidx = e.code === 'Home' ? 0 : selectedidx;
14935
+ const eidx = e.code === 'Home' ? selectedidx : ul.children.length - 1;
14922
14936
  for (let i = sidx; i <= eidx; i++) {
14923
14937
  const item = ul.children[i];
14924
14938
  this.notify('updatelist', { li: item, e: {