@syncfusion/ej2-dropdowns 20.2.39 → 20.2.44

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.
@@ -463,7 +463,7 @@ let DropDownBase = class DropDownBase extends Component {
463
463
  *
464
464
  * @returns {void}
465
465
  */
466
- initialize() {
466
+ initialize(e) {
467
467
  this.bindEvent = true;
468
468
  this.actionFailureTemplateId = `${this.element.id}${ACTIONFAILURETEMPLATE_PROPERTY}`;
469
469
  if (this.element.tagName === 'UL') {
@@ -482,7 +482,7 @@ let DropDownBase = class DropDownBase extends Component {
482
482
  }
483
483
  }
484
484
  else {
485
- this.setListData(this.dataSource, this.fields, this.query);
485
+ this.setListData(this.dataSource, this.fields, this.query, e);
486
486
  }
487
487
  }
488
488
  /**
@@ -589,7 +589,7 @@ let DropDownBase = class DropDownBase extends Component {
589
589
  * @param {Query} query - Accepts the external Query that execute along with data processing.
590
590
  * @returns {void}
591
591
  */
592
- setListData(dataSource, fields, query) {
592
+ setListData(dataSource, fields, query, event) {
593
593
  fields = fields ? fields : this.fields;
594
594
  let ulElement;
595
595
  this.isActive = true;
@@ -635,7 +635,7 @@ let DropDownBase = class DropDownBase extends Component {
635
635
  this.trigger('actionComplete', localDataArgs, (localDataArgs) => {
636
636
  if (!localDataArgs.cancel) {
637
637
  ulElement = this.renderItems(localDataArgs.result, fields);
638
- this.onActionComplete(ulElement, localDataArgs.result);
638
+ this.onActionComplete(ulElement, localDataArgs.result, event);
639
639
  if (this.groupTemplate) {
640
640
  this.renderGroupTemplate(ulElement);
641
641
  }
@@ -1024,7 +1024,7 @@ let DropDownBase = class DropDownBase extends Component {
1024
1024
  * @param {Query} query - Accepts the external Query that execute along with data processing.
1025
1025
  * @returns {void}
1026
1026
  */
1027
- resetList(dataSource, fields, query) {
1027
+ resetList(dataSource, fields, query, e) {
1028
1028
  if (this.list) {
1029
1029
  if ((this.element.tagName === 'SELECT' && this.element.options.length > 0)
1030
1030
  || (this.element.tagName === 'UL' && this.element.childNodes.length > 0)) {
@@ -1035,7 +1035,7 @@ let DropDownBase = class DropDownBase extends Component {
1035
1035
  }
1036
1036
  }
1037
1037
  dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length ? this.selectData : dataSource;
1038
- this.setListData(dataSource, fields, query);
1038
+ this.setListData(dataSource, fields, query, e);
1039
1039
  }
1040
1040
  }
1041
1041
  updateSelectElementData(isFiltering) {
@@ -1126,7 +1126,7 @@ let DropDownBase = class DropDownBase extends Component {
1126
1126
  * @private
1127
1127
  * @returns {void}
1128
1128
  */
1129
- render(isEmptyData) {
1129
+ render(e, isEmptyData) {
1130
1130
  this.list = this.createElement('div', { className: dropDownBaseClasses.content, attrs: { 'tabindex': '0' } });
1131
1131
  this.list.classList.add(dropDownBaseClasses.root);
1132
1132
  this.setFields();
@@ -1150,7 +1150,7 @@ let DropDownBase = class DropDownBase extends Component {
1150
1150
  this.setEnableRtl();
1151
1151
  this.setEnabled();
1152
1152
  if (!isEmptyData) {
1153
- this.initialize();
1153
+ this.initialize(e);
1154
1154
  }
1155
1155
  }
1156
1156
  /**
@@ -1567,8 +1567,8 @@ let DropDownList = class DropDownList extends DropDownBase {
1567
1567
  this.popupObj.setProperties({ 'zIndex': this.zIndex });
1568
1568
  }
1569
1569
  }
1570
- renderList(isEmptyData) {
1571
- super.render(isEmptyData);
1570
+ renderList(e, isEmptyData) {
1571
+ super.render(e, isEmptyData);
1572
1572
  this.unWireListEvents();
1573
1573
  this.wireListEvents();
1574
1574
  }
@@ -2051,7 +2051,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2051
2051
  const isTabAction = e.action === 'tab' || e.action === 'close';
2052
2052
  if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape') {
2053
2053
  this.searchKeyEvent = e;
2054
- this.renderList();
2054
+ this.renderList(e);
2055
2055
  }
2056
2056
  if (isNullOrUndefined(this.list) || (!isNullOrUndefined(this.liCollections) &&
2057
2057
  isNavigation && this.liCollections.length === 0) || this.isRequested) {
@@ -2090,7 +2090,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2090
2090
  }
2091
2091
  break;
2092
2092
  case 'open':
2093
- this.showPopup();
2093
+ this.showPopup(e);
2094
2094
  break;
2095
2095
  case 'hide':
2096
2096
  this.preventAltUp = this.isPopupOpen;
@@ -2282,7 +2282,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2282
2282
  }
2283
2283
  if (!this.readonly) {
2284
2284
  if (this.isPopupOpen) {
2285
- this.hidePopup();
2285
+ this.hidePopup(e);
2286
2286
  if (this.isFilterLayout()) {
2287
2287
  this.focusDropDown(e);
2288
2288
  }
@@ -2292,7 +2292,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2292
2292
  this.floatLabelChange();
2293
2293
  this.queryString = this.inputElement.value.trim() === '' ? null : this.inputElement.value;
2294
2294
  this.isDropDownClick = true;
2295
- this.showPopup();
2295
+ this.showPopup(e);
2296
2296
  }
2297
2297
  // eslint-disable-next-line @typescript-eslint/no-this-alias
2298
2298
  const proxy = this;
@@ -2933,6 +2933,9 @@ let DropDownList = class DropDownList extends DropDownBase {
2933
2933
  }
2934
2934
  this.initial = false;
2935
2935
  }
2936
+ else if (this.getModuleName() === 'autocomplete' && this.value) {
2937
+ this.setInputValue();
2938
+ }
2936
2939
  if (this.getModuleName() !== 'autocomplete' && this.isFiltering() && !this.isTyped) {
2937
2940
  if (!this.actionCompleteData.isUpdated || ((!this.isCustomFilter
2938
2941
  && !this.isFilterFocus) || (isNullOrUndefined(this.itemData) && this.allowFiltering)
@@ -2954,7 +2957,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2954
2957
  }
2955
2958
  }
2956
2959
  if (this.beforePopupOpen) {
2957
- this.renderPopup();
2960
+ this.renderPopup(e);
2958
2961
  }
2959
2962
  }
2960
2963
  }
@@ -3024,7 +3027,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3024
3027
  removeClass(highlightedItem, dropDownListClasses.focus);
3025
3028
  }
3026
3029
  }
3027
- renderPopup() {
3030
+ renderPopup(e) {
3028
3031
  if (this.popupObj && document.body.contains(this.popupObj.element)) {
3029
3032
  this.refreshPopup();
3030
3033
  return;
@@ -3125,7 +3128,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3125
3128
  const animModel = { name: 'FadeIn', duration: 100 };
3126
3129
  this.beforePopupOpen = true;
3127
3130
  const popupInstance = this.popupObj;
3128
- const eventArgs = { popup: popupInstance, cancel: false, animation: animModel };
3131
+ const eventArgs = { popup: popupInstance, event: e, cancel: false, animation: animModel };
3129
3132
  this.trigger('open', eventArgs, (eventArgs) => {
3130
3133
  if (!eventArgs.cancel) {
3131
3134
  addClass([this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
@@ -3535,7 +3538,12 @@ let DropDownList = class DropDownList extends DropDownBase {
3535
3538
  setFooterTemplate(popupEle) {
3536
3539
  let compiledString;
3537
3540
  if (this.footer) {
3538
- this.footer.innerHTML = '';
3541
+ if (this.isReact) {
3542
+ this.clearTemplate(['footerTemplate']);
3543
+ }
3544
+ else {
3545
+ this.footer.innerHTML = '';
3546
+ }
3539
3547
  }
3540
3548
  else {
3541
3549
  this.footer = this.createElement('div');
@@ -3726,6 +3734,9 @@ let DropDownList = class DropDownList extends DropDownBase {
3726
3734
  }
3727
3735
  });
3728
3736
  }
3737
+ else if (this.getModuleName() === 'autocomplete') {
3738
+ this.setInputValue(newProp, oldProp);
3739
+ }
3729
3740
  else {
3730
3741
  this.setOldText(oldProp.text);
3731
3742
  }
@@ -3767,6 +3778,9 @@ let DropDownList = class DropDownList extends DropDownBase {
3767
3778
  }
3768
3779
  });
3769
3780
  }
3781
+ else if (this.getModuleName() === 'autocomplete') {
3782
+ this.setInputValue(newProp, oldProp);
3783
+ }
3770
3784
  else {
3771
3785
  this.setOldValue(oldProp.value);
3772
3786
  }
@@ -3879,6 +3893,8 @@ let DropDownList = class DropDownList extends DropDownBase {
3879
3893
  removeClass([this.inputWrapper.container], ['e-readonly']);
3880
3894
  }
3881
3895
  }
3896
+ setInputValue(newProp, oldProp) {
3897
+ }
3882
3898
  setCssClass(newClass, oldClass) {
3883
3899
  if (!isNullOrUndefined(oldClass)) {
3884
3900
  oldClass = (oldClass.replace(/\s+/g, ' ')).trim();
@@ -3905,7 +3921,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3905
3921
  *
3906
3922
  * @returns {void}
3907
3923
  */
3908
- showPopup() {
3924
+ showPopup(e) {
3909
3925
  if (!this.enabled) {
3910
3926
  return;
3911
3927
  }
@@ -3925,11 +3941,11 @@ let DropDownList = class DropDownList extends DropDownBase {
3925
3941
  }
3926
3942
  else if (isNullOrUndefined(this.list) || !isUndefined(this.list) && (this.list.classList.contains(dropDownBaseClasses.noData) ||
3927
3943
  this.list.querySelectorAll('.' + dropDownBaseClasses.li).length <= 0)) {
3928
- this.renderList();
3944
+ this.renderList(e);
3929
3945
  }
3930
- this.invokeRenderPopup();
3946
+ this.invokeRenderPopup(e);
3931
3947
  }
3932
- invokeRenderPopup() {
3948
+ invokeRenderPopup(e) {
3933
3949
  if (Browser.isDevice && this.isFilterLayout()) {
3934
3950
  // eslint-disable-next-line @typescript-eslint/no-this-alias
3935
3951
  const proxy = this;
@@ -3939,7 +3955,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3939
3955
  history.pushState({}, '');
3940
3956
  }
3941
3957
  if (!isNullOrUndefined(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData)) {
3942
- this.renderPopup();
3958
+ this.renderPopup(e);
3943
3959
  }
3944
3960
  attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
3945
3961
  }
@@ -5942,7 +5958,8 @@ let DropDownTree = class DropDownTree extends Component {
5942
5958
  }
5943
5959
  return 2;
5944
5960
  }
5945
- this.fields.dataSource = isNullOrUndefined(this.fields.dataSource) ? [] : this.fields.dataSource;
5961
+ if (isNullOrUndefined(this.fields.dataSource))
5962
+ this.fields.dataSource = [];
5946
5963
  for (let i = 0, len = this.fields.dataSource.length; i < len; i++) {
5947
5964
  if ((typeof field.child === 'string') && !isNullOrUndefined(getValue(field.child, this.fields.dataSource[i]))) {
5948
5965
  return 2;
@@ -7678,7 +7695,7 @@ let ComboBox = class ComboBox extends DropDownList {
7678
7695
  }
7679
7696
  }
7680
7697
  incrementalSearch(e) {
7681
- this.showPopup();
7698
+ this.showPopup(e);
7682
7699
  if (!isNullOrUndefined(this.listData)) {
7683
7700
  this.inlineSearch(e);
7684
7701
  e.preventDefault();
@@ -7938,8 +7955,8 @@ let ComboBox = class ComboBox extends DropDownList {
7938
7955
  * @returns {void}
7939
7956
  * @deprecated
7940
7957
  */
7941
- showPopup() {
7942
- super.showPopup();
7958
+ showPopup(e) {
7959
+ super.showPopup(e);
7943
7960
  }
7944
7961
  /* eslint-disable valid-jsdoc, jsdoc/require-param */
7945
7962
  /**
@@ -8214,13 +8231,13 @@ let AutoComplete = class AutoComplete extends ComboBox {
8214
8231
  this.isTyped = true;
8215
8232
  this.isDataFetched = this.isSelectCustom = false;
8216
8233
  if (isNullOrUndefined(this.list)) {
8217
- super.renderList(true);
8234
+ super.renderList(e, true);
8218
8235
  }
8219
8236
  this.queryString = this.filterInput.value;
8220
8237
  if (e.type !== 'mousedown' && (e.keyCode === 40 || e.keyCode === 38)) {
8221
8238
  this.queryString = this.queryString === '' ? null : this.queryString;
8222
8239
  this.beforePopupOpen = true;
8223
- this.resetList(this.dataSource, this.fields);
8240
+ this.resetList(this.dataSource, this.fields, null, e);
8224
8241
  return;
8225
8242
  }
8226
8243
  this.isSelected = false;
@@ -8240,7 +8257,7 @@ let AutoComplete = class AutoComplete extends ComboBox {
8240
8257
  this.trigger('filtering', eventArgs, (eventArgs) => {
8241
8258
  if (!eventArgs.cancel && !this.isFiltered && !eventArgs.preventDefaultAction) {
8242
8259
  this.searchList = true;
8243
- this.filterAction(this.dataSource, null, this.fields);
8260
+ this.filterAction(this.dataSource, null, this.fields, e);
8244
8261
  }
8245
8262
  });
8246
8263
  }
@@ -8257,13 +8274,13 @@ let AutoComplete = class AutoComplete extends ComboBox {
8257
8274
  this.isFiltered = true;
8258
8275
  this.filterAction(dataSource, query, fields);
8259
8276
  }
8260
- filterAction(dataSource, query, fields) {
8277
+ filterAction(dataSource, query, fields, e) {
8261
8278
  this.beforePopupOpen = true;
8262
8279
  if (this.queryString !== '' && (this.queryString.length >= this.minLength)) {
8263
- this.resetList(dataSource, fields, query);
8280
+ this.resetList(dataSource, fields, query, e);
8264
8281
  }
8265
8282
  else {
8266
- this.hidePopup();
8283
+ this.hidePopup(e);
8267
8284
  this.beforePopupOpen = false;
8268
8285
  }
8269
8286
  this.renderReactTemplates();
@@ -8349,9 +8366,9 @@ let AutoComplete = class AutoComplete extends ComboBox {
8349
8366
  isFiltering() {
8350
8367
  return true;
8351
8368
  }
8352
- renderPopup() {
8369
+ renderPopup(e) {
8353
8370
  this.list.scrollTop = 0;
8354
- super.renderPopup();
8371
+ super.renderPopup(e);
8355
8372
  }
8356
8373
  isEditTextBox() {
8357
8374
  return true && this.inputElement.value.trim() !== '';
@@ -8363,13 +8380,37 @@ let AutoComplete = class AutoComplete extends ComboBox {
8363
8380
  isSelectFocusItem(element) {
8364
8381
  return false;
8365
8382
  }
8383
+ setInputValue(newProp, oldProp) {
8384
+ let oldValue = oldProp && oldProp.text ? oldProp.text : oldProp ? oldProp.value : oldProp;
8385
+ let value = newProp && newProp.text ? newProp.text : newProp && newProp.value ? newProp.value : this.value;
8386
+ if (value && this.typedString === '' && !this.allowCustom && !(this.dataSource instanceof DataManager)) {
8387
+ let checkFields_1 = this.typeOfData(this.dataSource).typeof === 'string' ? '' : this.fields.value;
8388
+ const listLength = this.getItems().length;
8389
+ let query = new Query();
8390
+ let _this = this;
8391
+ new DataManager(this.dataSource).executeQuery(query.where(new Predicate(checkFields_1, 'equal', value)))
8392
+ .then(function (e) {
8393
+ if (e.result.length > 0) {
8394
+ _this.value = checkFields_1 !== '' ? e.result[0][_this.fields.value].toString() : e.result[0].toString();
8395
+ _this.addItem(e.result, listLength);
8396
+ _this.updateValues();
8397
+ }
8398
+ else {
8399
+ newProp && newProp.text ? _this.setOldText(oldValue) : newProp && newProp.value ? _this.setOldValue(oldValue) : _this.updateValues();
8400
+ }
8401
+ });
8402
+ }
8403
+ else if (newProp) {
8404
+ newProp.text ? this.setOldText(oldValue) : this.setOldValue(oldValue);
8405
+ }
8406
+ }
8366
8407
  /**
8367
8408
  * Search the entered text and show it in the suggestion list if available.
8368
8409
  *
8369
8410
  * @returns {void}
8370
8411
  * @deprecated
8371
8412
  */
8372
- showPopup() {
8413
+ showPopup(e) {
8373
8414
  if (!this.enabled) {
8374
8415
  return;
8375
8416
  }
@@ -8380,10 +8421,10 @@ let AutoComplete = class AutoComplete extends ComboBox {
8380
8421
  this.beforePopupOpen = true;
8381
8422
  this.preventAutoFill = true;
8382
8423
  if (isNullOrUndefined(this.list)) {
8383
- this.renderList();
8424
+ this.renderList(e);
8384
8425
  }
8385
8426
  else {
8386
- this.resetList(this.dataSource, this.fields);
8427
+ this.resetList(this.dataSource, this.fields, null, e);
8387
8428
  }
8388
8429
  }
8389
8430
  /**
@@ -8867,7 +8908,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
8867
8908
  }
8868
8909
  }
8869
8910
  }
8870
- onPopupShown() {
8911
+ onPopupShown(e) {
8871
8912
  if (Browser.isDevice && (this.mode === 'CheckBox' && this.allowFiltering)) {
8872
8913
  // eslint-disable-next-line @typescript-eslint/no-this-alias
8873
8914
  const proxy = this;
@@ -8878,7 +8919,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
8878
8919
  history.pushState({}, '');
8879
8920
  }
8880
8921
  const animModel = { name: 'FadeIn', duration: 100 };
8881
- const eventArgs = { popup: this.popupObj, cancel: false, animation: animModel };
8922
+ const eventArgs = { popup: this.popupObj, event: e, cancel: false, animation: animModel };
8882
8923
  this.trigger('open', eventArgs, (eventArgs) => {
8883
8924
  if (!eventArgs.cancel) {
8884
8925
  this.focusAtFirstListItem();
@@ -9102,7 +9143,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9102
9143
  this.renderPopup();
9103
9144
  if (this.beforePopupOpen) {
9104
9145
  this.beforePopupOpen = false;
9105
- this.onPopupShown();
9146
+ this.onPopupShown(e);
9106
9147
  }
9107
9148
  }
9108
9149
  refreshSelection() {
@@ -9394,7 +9435,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9394
9435
  }
9395
9436
  if (!this.isPopupOpen() &&
9396
9437
  (this.openOnClick || (this.showDropDownIcon && e.target && e.target.className === dropdownIcon))) {
9397
- this.showPopup();
9438
+ this.showPopup(e);
9398
9439
  }
9399
9440
  else {
9400
9441
  this.hidePopup(e);
@@ -9688,7 +9729,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9688
9729
  break;
9689
9730
  case 40:
9690
9731
  if (!this.isPopupOpen()) {
9691
- this.showPopup();
9732
+ this.showPopup(e);
9692
9733
  e.preventDefault();
9693
9734
  }
9694
9735
  break;
@@ -10873,7 +10914,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
10873
10914
  this.keyCode = e.keyCode;
10874
10915
  }
10875
10916
  if (!this.isPopupOpen() && this.openOnClick) {
10876
- this.showPopup();
10917
+ this.showPopup(e);
10877
10918
  }
10878
10919
  this.openClick(e);
10879
10920
  if (this.checkTextLength() && !this.allowFiltering && !isNullOrUndefined(e) && (e.keyCode !== 8)) {
@@ -11020,7 +11061,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11020
11061
  || this.list.querySelector('.e-ul') && this.list.querySelector('.e-ul').childElementCount === 0)) {
11021
11062
  isEmptyData = true;
11022
11063
  }
11023
- super.render(isEmptyData);
11064
+ super.render(null, isEmptyData);
11024
11065
  this.unwireListEvents();
11025
11066
  this.wireListEvents();
11026
11067
  }
@@ -11108,7 +11149,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11108
11149
  }
11109
11150
  }
11110
11151
  updateDataList() {
11111
- if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction)) {
11152
+ if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {
11112
11153
  let isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
11113
11154
  let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
11114
11155
  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));
@@ -12285,7 +12326,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12285
12326
  *
12286
12327
  * @returns {void}
12287
12328
  */
12288
- showPopup() {
12329
+ showPopup(e) {
12289
12330
  if (!this.enabled) {
12290
12331
  return;
12291
12332
  }
@@ -12294,7 +12335,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12294
12335
  if (!args.cancel) {
12295
12336
  if (!this.ulElement) {
12296
12337
  this.beforePopupOpen = true;
12297
- super.render();
12338
+ super.render(e);
12298
12339
  if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering) {
12299
12340
  this.notify('popupFullScreen', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
12300
12341
  }
@@ -12310,7 +12351,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12310
12351
  this.beforePopupOpen = false;
12311
12352
  return;
12312
12353
  }
12313
- this.onPopupShown();
12354
+ this.onPopupShown(e);
12314
12355
  }
12315
12356
  });
12316
12357
  }
@@ -14793,9 +14834,20 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14793
14834
  fListBox.value = [];
14794
14835
  listData = listData
14795
14836
  .filter((data) => data.isHeader !== true);
14796
- tListBox.listData = listData;
14797
- tListBox.jsonData = jsonData;
14798
- fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
14837
+ tListBox.listData = tListBox.jsonData = listData;
14838
+ if (fListBox.listData.length == fListBox.jsonData.length) {
14839
+ fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
14840
+ }
14841
+ else if (this.allowFiltering) {
14842
+ for (let i = 0; i < fListBox.listData.length; i++) {
14843
+ for (let j = 0; j < fListBox.jsonData.length; j++) {
14844
+ if (fListBox.listData[i] === fListBox.jsonData[j]) {
14845
+ fListBox.jsonData.splice(j, 1);
14846
+ }
14847
+ }
14848
+ }
14849
+ fListBox.listData = fListBox.sortedData = [];
14850
+ }
14799
14851
  if (isRefresh) {
14800
14852
  let sourceElem = tListBox.renderItems(listData, tListBox.fields);
14801
14853
  tListBox.updateListItems(sourceElem, tListBox.ulElement);