@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.
@@ -1275,7 +1275,7 @@ let DropDownBase = class DropDownBase extends Component {
1275
1275
  isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
1276
1276
  }
1277
1277
  }
1278
- if (this.getModuleName() === 'multiselect') {
1278
+ if (this.getModuleName() === 'multiselect' && !this.isVirtualReorder && !isContainSkeleton.firstChild.classList.contains('e-reorder')) {
1279
1279
  for (let i = 0; i < totalSkeletonCount && this.totalItemCount !== this.viewPortInfo.endIndex; i++) {
1280
1280
  const liElement = this.createElement('li', { className: `${dropDownBaseClasses.virtualList} e-virtual-list-end`, styles: 'overflow: inherit' });
1281
1281
  if (this.isVirtualizationEnabled && this.itemTemplate) {
@@ -7806,6 +7806,11 @@ let DropDownTree = class DropDownTree extends Component {
7806
7806
  }
7807
7807
  }
7808
7808
  this.treeObj.fields = this.getTreeFields(fields);
7809
+ if ((this.previousFilterText && this.previousFilterText !== '' && args.text !== '' && this.previousFilterText.indexOf(args.text) !== -1) ||
7810
+ (args.text && args.text !== '' && this.previousFilterText !== '' && args.text.indexOf(this.previousFilterText) !== -1)) {
7811
+ this.isFilterRestore = true;
7812
+ }
7813
+ this.previousFilterText = args.text;
7809
7814
  this.treeObj.dataBind();
7810
7815
  if (this.popupObj) {
7811
7816
  this.popupObj.refreshPosition();
@@ -12908,8 +12913,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12908
12913
  else {
12909
12914
  this.resetList(this.dataSource, this.fields, query);
12910
12915
  }
12911
- this.isVirtualReorder = false;
12912
12916
  this.UpdateSkeleton();
12917
+ this.isVirtualReorder = false;
12913
12918
  this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
12914
12919
  this.virtualItemCount = this.itemCount;
12915
12920
  if (this.mode !== 'CheckBox') {
@@ -13211,8 +13216,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13211
13216
  if (!isNullOrUndefined(this.value)) {
13212
13217
  valuecheck = this.presentItemValue(this.ulElement);
13213
13218
  }
13219
+ const isContainsValue = valuecheck.some((item) => item !== null);
13214
13220
  if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
13215
- && this.listData != null && !(valuecheck.length === 1 && valuecheck[0] == null)) {
13221
+ && this.listData != null && isContainsValue) {
13216
13222
  this.isaddNonPresentItems = true;
13217
13223
  this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
13218
13224
  this.isaddNonPresentItems = false;
@@ -13496,9 +13502,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13496
13502
  return this.virtualFilterQuery(filterQuery);
13497
13503
  }
13498
13504
  if (this.virtualSelectAll) {
13499
- return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ?
13500
- this.query.take(this.maximumSelectionLength).requiresCount() :
13501
- new Query().take(this.maximumSelectionLength).requiresCount();
13505
+ return query ? query.skip(0).take(this.maximumSelectionLength).requiresCount() : this.query ?
13506
+ this.query.skip(0).take(this.maximumSelectionLength).requiresCount() :
13507
+ new Query().skip(0).take(this.maximumSelectionLength).requiresCount();
13502
13508
  }
13503
13509
  return filterQuery;
13504
13510
  }
@@ -18021,6 +18027,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18021
18027
  updateVal(newProp, oldProp, prop) {
18022
18028
  if (!this.list) {
18023
18029
  this.onLoadSelect();
18030
+ if (this.enableVirtualization) {
18031
+ this.setProperties({ text: '' }, true);
18032
+ this.checkInitialValue();
18033
+ }
18024
18034
  }
18025
18035
  else if ((this.dataSource instanceof DataManager) && (!this.listData || !(this.mainList && this.mainData))) {
18026
18036
  this.onLoadSelect();
@@ -18030,8 +18040,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18030
18040
  if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
18031
18041
  valuecheck = this.presentItemValue(this.ulElement);
18032
18042
  }
18043
+ const isContainsValue = valuecheck.some((item) => item !== null);
18033
18044
  if (prop === 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
18034
- && this.listData != null) {
18045
+ && this.listData != null && isContainsValue) {
18035
18046
  this.mainData = null;
18036
18047
  this.setDynValue = true;
18037
18048
  this.isaddNonPresentItems = true;
@@ -18059,10 +18070,41 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18059
18070
  this.initialValueUpdate(this.dataSource, true);
18060
18071
  }
18061
18072
  else if (!this.isInitRemoteVirtualData) {
18062
- this.isDynamicRemoteVirtualData = true;
18063
- this.initialValueUpdate(this.listData, true);
18064
- this.isDynamicRemoteVirtualData = false;
18065
- this.initialUpdate();
18073
+ if (this.allowObjectBinding && !isContainsValue && this.value && this.value.length) {
18074
+ const fields = !this.isPrimitiveData ? this.fields.value : '';
18075
+ let predicate;
18076
+ for (let i = 0; i < this.value.length; i++) {
18077
+ const value = this.allowObjectBinding ?
18078
+ getValue((this.fields.value) ? this.fields.value : '', this.value[i]) :
18079
+ this.value[i];
18080
+ if (i === 0) {
18081
+ predicate = new Predicate(fields, 'equal', value);
18082
+ }
18083
+ else {
18084
+ predicate = predicate.or(fields, 'equal', value);
18085
+ }
18086
+ }
18087
+ if (this.dataSource instanceof DataManager) {
18088
+ this.dataSource.executeQuery(new Query().where(predicate))
18089
+ .then((e) => {
18090
+ if (e.result.length > 0) {
18091
+ const listItems = e.result;
18092
+ this.isDynamicRemoteVirtualData = true;
18093
+ setTimeout(() => {
18094
+ this.initialValueUpdate(listItems, true);
18095
+ this.isDynamicRemoteVirtualData = false;
18096
+ this.initialUpdate();
18097
+ }, 100);
18098
+ }
18099
+ });
18100
+ }
18101
+ }
18102
+ else {
18103
+ this.isDynamicRemoteVirtualData = true;
18104
+ this.initialValueUpdate(this.listData, true);
18105
+ this.isDynamicRemoteVirtualData = false;
18106
+ this.initialUpdate();
18107
+ }
18066
18108
  }
18067
18109
  if (this.mode !== 'Box' && !this.inputFocus) {
18068
18110
  this.updateDelimView();