@syncfusion/ej2-dropdowns 29.2.8 → 29.2.10

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.
@@ -1356,7 +1356,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1356
1356
  isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
1357
1357
  }
1358
1358
  }
1359
- if (this.getModuleName() === 'multiselect') {
1359
+ if (this.getModuleName() === 'multiselect' && !this.isVirtualReorder && !isContainSkeleton.firstChild.classList.contains('e-reorder')) {
1360
1360
  for (var i = 0; i < totalSkeletonCount && this.totalItemCount !== this.viewPortInfo.endIndex; i++) {
1361
1361
  var liElement = this.createElement('li', { className: dropDownBaseClasses.virtualList + " e-virtual-list-end", styles: 'overflow: inherit' });
1362
1362
  if (this.isVirtualizationEnabled && this.itemTemplate) {
@@ -7975,6 +7975,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7975
7975
  }
7976
7976
  }
7977
7977
  _this.treeObj.fields = _this.getTreeFields(fields);
7978
+ if ((_this.previousFilterText && _this.previousFilterText !== '' && args.text !== '' && _this.previousFilterText.indexOf(args.text) !== -1) ||
7979
+ (args.text && args.text !== '' && _this.previousFilterText !== '' && args.text.indexOf(_this.previousFilterText) !== -1)) {
7980
+ _this.isFilterRestore = true;
7981
+ }
7982
+ _this.previousFilterText = args.text;
7978
7983
  _this.treeObj.dataBind();
7979
7984
  if (_this.popupObj) {
7980
7985
  _this.popupObj.refreshPosition();
@@ -13162,8 +13167,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13162
13167
  else {
13163
13168
  this.resetList(this.dataSource, this.fields, query);
13164
13169
  }
13165
- this.isVirtualReorder = false;
13166
13170
  this.UpdateSkeleton();
13171
+ this.isVirtualReorder = false;
13167
13172
  this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
13168
13173
  this.virtualItemCount = this.itemCount;
13169
13174
  if (this.mode !== 'CheckBox') {
@@ -13466,8 +13471,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13466
13471
  if (!isNullOrUndefined(this.value)) {
13467
13472
  valuecheck = this.presentItemValue(this.ulElement);
13468
13473
  }
13474
+ var isContainsValue = valuecheck.some(function (item) { return item !== null; });
13469
13475
  if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
13470
- && this.listData != null && !(valuecheck.length === 1 && valuecheck[0] == null)) {
13476
+ && this.listData != null && isContainsValue) {
13471
13477
  this.isaddNonPresentItems = true;
13472
13478
  this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
13473
13479
  this.isaddNonPresentItems = false;
@@ -13751,9 +13757,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13751
13757
  return this.virtualFilterQuery(filterQuery);
13752
13758
  }
13753
13759
  if (this.virtualSelectAll) {
13754
- return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ?
13755
- this.query.take(this.maximumSelectionLength).requiresCount() :
13756
- new Query().take(this.maximumSelectionLength).requiresCount();
13760
+ return query ? query.skip(0).take(this.maximumSelectionLength).requiresCount() : this.query ?
13761
+ this.query.skip(0).take(this.maximumSelectionLength).requiresCount() :
13762
+ new Query().skip(0).take(this.maximumSelectionLength).requiresCount();
13757
13763
  }
13758
13764
  return filterQuery;
13759
13765
  }
@@ -18307,8 +18313,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18307
18313
  });
18308
18314
  };
18309
18315
  MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
18316
+ var _this = this;
18310
18317
  if (!this.list) {
18311
18318
  this.onLoadSelect();
18319
+ if (this.enableVirtualization) {
18320
+ this.setProperties({ text: '' }, true);
18321
+ this.checkInitialValue();
18322
+ }
18312
18323
  }
18313
18324
  else if ((this.dataSource instanceof DataManager) && (!this.listData || !(this.mainList && this.mainData))) {
18314
18325
  this.onLoadSelect();
@@ -18318,8 +18329,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18318
18329
  if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
18319
18330
  valuecheck = this.presentItemValue(this.ulElement);
18320
18331
  }
18332
+ var isContainsValue = valuecheck.some(function (item) { return item !== null; });
18321
18333
  if (prop === 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
18322
- && this.listData != null) {
18334
+ && this.listData != null && isContainsValue) {
18323
18335
  this.mainData = null;
18324
18336
  this.setDynValue = true;
18325
18337
  this.isaddNonPresentItems = true;
@@ -18347,10 +18359,41 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18347
18359
  this.initialValueUpdate(this.dataSource, true);
18348
18360
  }
18349
18361
  else if (!this.isInitRemoteVirtualData) {
18350
- this.isDynamicRemoteVirtualData = true;
18351
- this.initialValueUpdate(this.listData, true);
18352
- this.isDynamicRemoteVirtualData = false;
18353
- this.initialUpdate();
18362
+ if (this.allowObjectBinding && !isContainsValue && this.value && this.value.length) {
18363
+ var fields = !this.isPrimitiveData ? this.fields.value : '';
18364
+ var predicate = void 0;
18365
+ for (var i = 0; i < this.value.length; i++) {
18366
+ var value = this.allowObjectBinding ?
18367
+ getValue((this.fields.value) ? this.fields.value : '', this.value[i]) :
18368
+ this.value[i];
18369
+ if (i === 0) {
18370
+ predicate = new Predicate(fields, 'equal', value);
18371
+ }
18372
+ else {
18373
+ predicate = predicate.or(fields, 'equal', value);
18374
+ }
18375
+ }
18376
+ if (this.dataSource instanceof DataManager) {
18377
+ this.dataSource.executeQuery(new Query().where(predicate))
18378
+ .then(function (e) {
18379
+ if (e.result.length > 0) {
18380
+ var listItems_2 = e.result;
18381
+ _this.isDynamicRemoteVirtualData = true;
18382
+ setTimeout(function () {
18383
+ _this.initialValueUpdate(listItems_2, true);
18384
+ _this.isDynamicRemoteVirtualData = false;
18385
+ _this.initialUpdate();
18386
+ }, 100);
18387
+ }
18388
+ });
18389
+ }
18390
+ }
18391
+ else {
18392
+ this.isDynamicRemoteVirtualData = true;
18393
+ this.initialValueUpdate(this.listData, true);
18394
+ this.isDynamicRemoteVirtualData = false;
18395
+ this.initialUpdate();
18396
+ }
18354
18397
  }
18355
18398
  if (this.mode !== 'Box' && !this.inputFocus) {
18356
18399
  this.updateDelimView();
@@ -18949,7 +18992,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18949
18992
  }
18950
18993
  if (this.value && this.value.length) {
18951
18994
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
18952
- var listItems_2;
18995
+ var listItems_3;
18953
18996
  if (this.enableVirtualization) {
18954
18997
  var fields = !this.isPrimitiveData ? this.fields.value : '';
18955
18998
  var predicate = void 0;
@@ -18968,11 +19011,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18968
19011
  this.dataSource.executeQuery(new Query().where(predicate))
18969
19012
  .then(function (e) {
18970
19013
  if (e.result.length > 0) {
18971
- listItems_2 = e.result;
19014
+ listItems_3 = e.result;
18972
19015
  _this.initStatus = false;
18973
19016
  _this.isInitRemoteVirtualData = true;
18974
19017
  setTimeout(function () {
18975
- _this.initialValueUpdate(listItems_2, true);
19018
+ _this.initialValueUpdate(listItems_3, true);
18976
19019
  _this.initialUpdate();
18977
19020
  _this.isInitRemoteVirtualData = false;
18978
19021
  }, 100);
@@ -18981,18 +19024,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18981
19024
  });
18982
19025
  }
18983
19026
  else {
18984
- listItems_2 = new DataManager(this.dataSource).executeLocal(new Query().where(predicate));
19027
+ listItems_3 = new DataManager(this.dataSource).executeLocal(new Query().where(predicate));
18985
19028
  }
18986
19029
  }
18987
19030
  if (!(this.dataSource instanceof DataManager)) {
18988
- this.initialValueUpdate(listItems_2, true);
19031
+ this.initialValueUpdate(listItems_3, true);
18989
19032
  this.initialUpdate();
18990
19033
  }
18991
19034
  else {
18992
19035
  this.setInitialValue = function () {
18993
19036
  _this.initStatus = false;
18994
19037
  if (!_this.enableVirtualization || (_this.enableVirtualization && (!(_this.dataSource instanceof DataManager)))) {
18995
- _this.initialValueUpdate(listItems_2);
19038
+ _this.initialValueUpdate(listItems_3);
18996
19039
  }
18997
19040
  _this.initialUpdate();
18998
19041
  _this.setInitialValue = null;