@syncfusion/ej2-dropdowns 33.1.47 → 33.2.3

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.
@@ -1651,8 +1651,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1651
1651
  _this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
1652
1652
  var isReOrder = true;
1653
1653
  if (!_this.virtualSelectAll) {
1654
- var newQueryWhereCount = void 0;
1655
- var queryWhereCount = void 0;
1654
+ var newQueryWhereCount = 0;
1655
+ var queryWhereCount = 0;
1656
1656
  var newQuery = query_1.clone();
1657
1657
  for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
1658
1658
  if (newQuery.queries[queryElements].fn === 'onWhere') {
@@ -18580,7 +18580,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18580
18580
  this.virtualSelectAll = true;
18581
18581
  length = this.virtualSelectAllData && this.virtualSelectAllData.length !== 0 ? this.virtualSelectAllData.length : length;
18582
18582
  this.listData = this.virtualSelectAllData;
18583
- var ulElement = this.createListItems(this.virtualSelectAllData.slice(0, 30), this.fields);
18583
+ var ulElement = this.createListItems(this.virtualSelectAllData.slice(0, Math.min(50, this.virtualSelectAllData.length)), this.fields);
18584
18584
  var firstItems = ulElement.querySelectorAll('li');
18585
18585
  var fragment_1 = document.createDocumentFragment();
18586
18586
  firstItems.forEach(function (node) {
@@ -18607,7 +18607,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18607
18607
  this.updateListSelection(concatenatedNodeList[index], event, length - index);
18608
18608
  }
18609
18609
  else {
18610
- var value = getValue(this.fields.value ? this.fields.value : '', this.virtualSelectAllData[index]);
18610
+ var rawItem = this.virtualSelectAllData[index];
18611
+ var value = this.fields.value
18612
+ ? getValue(this.fields.value, rawItem)
18613
+ : (typeof rawItem === 'object' && rawItem !== null ? rawItem : rawItem);
18611
18614
  value = this.allowObjectBinding ? this.getDataByValue(value) : value;
18612
18615
  if (((!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0) ||
18613
18616
  (this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0))) {
@@ -18639,12 +18642,17 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18639
18642
  var batch = dataArray.slice(currentIndex, endIndex);
18640
18643
  // Use map on the batch
18641
18644
  batch.map(function (obj) {
18642
- if (_this.value && obj[_this.fields.value] != null && Array.isArray(_this.value) &&
18643
- ((!_this.allowObjectBinding && _this.value.indexOf(obj[_this.fields.value]) < 0) ||
18644
- (_this.allowObjectBinding && !_this.isObjectInArray(obj[_this.fields.value], _this.value)))) {
18645
- var value = obj[_this.fields.value];
18646
- var text = (obj[_this.fields.text]).toString();
18647
- _this.dispatchSelect(value, event, null, false, length, obj, text);
18645
+ var isPlainValue = typeof obj !== 'object' || obj === null;
18646
+ var value = isPlainValue
18647
+ ? obj
18648
+ : (_this.fields.value ? obj[_this.fields.value] : obj);
18649
+ var text = isPlainValue
18650
+ ? String(obj)
18651
+ : (_this.fields.text ? (obj[_this.fields.text]).toString() : String(obj));
18652
+ if (_this.value && value != null && Array.isArray(_this.value) &&
18653
+ ((!_this.allowObjectBinding && _this.value.indexOf(value) < 0) ||
18654
+ (_this.allowObjectBinding && !_this.isObjectInArray(value, _this.value)))) {
18655
+ _this.dispatchSelect(value, event, null, false, length, isPlainValue ? null : obj, text);
18648
18656
  }
18649
18657
  });
18650
18658
  currentIndex = endIndex;