@syncfusion/ej2-dropdowns 33.2.6 → 33.2.7

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.
@@ -3124,7 +3124,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
3124
3124
  else {
3125
3125
  for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
3126
3126
  var item = _c[_b];
3127
- if (!isNullOrUndefined(item) && getValue((this.fields.value ? this.fields.value : 'value'), item) === value) {
3127
+ if (!isNullOrUndefined(item) && (getValue((this.fields.value ? this.fields.value : 'value'), item) === value
3128
+ || this.getModuleName() === 'multiselect' && this.isVirtualizationEnabled && this.properties.allowCustomValue && getValue((this.fields.value ? this.fields.value : 'value'), item) === value.toString())) {
3128
3129
  return item;
3129
3130
  }
3130
3131
  }
@@ -8276,6 +8277,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8276
8277
  // Specifies if the checkAll method has been called
8277
8278
  _this.isCheckAllCalled = false;
8278
8279
  _this.isFromFilterChange = false;
8280
+ _this.fallbackValue = [];
8279
8281
  return _this;
8280
8282
  }
8281
8283
  /**
@@ -9526,6 +9528,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9526
9528
  };
9527
9529
  DropDownTree.prototype.setTreeValue = function () {
9528
9530
  if (this.value !== null && this.value.length !== 0) {
9531
+ var dataReady = this.treeItems && this.treeItems.length > 0;
9532
+ if (!dataReady && this.fallbackValue.length === 0) {
9533
+ this.fallbackValue = this.value.slice();
9534
+ }
9529
9535
  var data = void 0;
9530
9536
  if (this.showCheckBox || this.allowMultiSelection) {
9531
9537
  for (var i = this.value.length - 1; i >= 0; i--) {
@@ -11179,6 +11185,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
11179
11185
  * @private
11180
11186
  */
11181
11187
  DropDownTree.prototype.onPropertyChanged = function (newProp, oldProp) {
11188
+ var _this = this;
11182
11189
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
11183
11190
  var prop = _a[_i];
11184
11191
  switch (prop) {
@@ -11199,6 +11206,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
11199
11206
  break;
11200
11207
  case 'fields':
11201
11208
  this.setFields();
11209
+ setTimeout(function () {
11210
+ if (_this.value.length === 0 && _this.fallbackValue.length > 0) {
11211
+ _this.value = _this.fallbackValue;
11212
+ _this.updateValue(_this.fallbackValue);
11213
+ _this.fallbackValue = [];
11214
+ }
11215
+ }, 1);
11202
11216
  break;
11203
11217
  case 'readonly':
11204
11218
  Input.setReadonly(newProp.readonly, this.inputEle);
@@ -14190,7 +14204,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14190
14204
  else {
14191
14205
  this.updateActionList(ulElement, list, e);
14192
14206
  }
14193
- if (this.dataSource instanceof DataManager && this.allowCustomValue && !this.isCustomRendered &&
14207
+ if (this.dataSource instanceof DataManager && this.allowCustomValue && (!this.isCustomRendered || this.enableVirtualization) &&
14194
14208
  this.inputElement.value && this.inputElement.value !== '') {
14195
14209
  var query = new Query();
14196
14210
  query = this.allowFiltering ? query.where(this.fields.text, 'startswith', this.inputElement.value, this.ignoreCase, this.ignoreAccent) : query;
@@ -14714,7 +14728,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14714
14728
  if (this.enableVirtualization) {
14715
14729
  this.virtualCustomData = dataItem_1;
14716
14730
  var tempData = this.dataSource instanceof DataManager ?
14717
- JSON.parse(JSON.stringify(this.listData)) : JSON.parse(JSON.stringify(this.dataSource));
14731
+ JSON.parse(JSON.stringify(this.mainData)) : JSON.parse(JSON.stringify(this.dataSource));
14718
14732
  var totalData = [];
14719
14733
  if (this.virtualCustomSelectData && this.virtualCustomSelectData.length > 0) {
14720
14734
  totalData = tempData.concat(this.virtualCustomSelectData);
@@ -17640,7 +17654,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17640
17654
  this.allowCustomValue &&
17641
17655
  ((!(this.dataSource instanceof DataManager)) ||
17642
17656
  (this.dataSource instanceof DataManager && isInitialVirtualData)))) {
17643
- var indexItem = this.listData.length;
17657
+ var indexItem = this.dataSource instanceof DataManager ? this.totalItemCount : this.listData.length;
17644
17658
  var newValue = {};
17645
17659
  setValue(this.fields.text, value_2, newValue);
17646
17660
  setValue(this.fields.value, value_2, newValue);
@@ -20119,6 +20133,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
20119
20133
  }, 100);
20120
20134
  _this.initStatus = true;
20121
20135
  }
20136
+ else {
20137
+ _this.initialValueUpdate(_this.value, true, isInitialRender);
20138
+ _this.initialUpdate();
20139
+ }
20122
20140
  });
20123
20141
  }
20124
20142
  else {