@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.
@@ -1567,8 +1567,8 @@ let DropDownBase = class DropDownBase extends Component {
1567
1567
  this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
1568
1568
  let isReOrder = true;
1569
1569
  if (!this.virtualSelectAll) {
1570
- let newQueryWhereCount;
1571
- let queryWhereCount;
1570
+ let newQueryWhereCount = 0;
1571
+ let queryWhereCount = 0;
1572
1572
  const newQuery = query.clone();
1573
1573
  for (let queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
1574
1574
  if (newQuery.queries[queryElements].fn === 'onWhere') {
@@ -18290,7 +18290,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18290
18290
  this.virtualSelectAll = true;
18291
18291
  length = this.virtualSelectAllData && this.virtualSelectAllData.length !== 0 ? this.virtualSelectAllData.length : length;
18292
18292
  this.listData = this.virtualSelectAllData;
18293
- const ulElement = this.createListItems(this.virtualSelectAllData.slice(0, 30), this.fields);
18293
+ const ulElement = this.createListItems(this.virtualSelectAllData.slice(0, Math.min(50, this.virtualSelectAllData.length)), this.fields);
18294
18294
  const firstItems = ulElement.querySelectorAll('li');
18295
18295
  const fragment = document.createDocumentFragment();
18296
18296
  firstItems.forEach((node) => {
@@ -18317,7 +18317,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18317
18317
  this.updateListSelection(concatenatedNodeList[index], event, length - index);
18318
18318
  }
18319
18319
  else {
18320
- let value = getValue(this.fields.value ? this.fields.value : '', this.virtualSelectAllData[index]);
18320
+ const rawItem = this.virtualSelectAllData[index];
18321
+ let value = this.fields.value
18322
+ ? getValue(this.fields.value, rawItem)
18323
+ : (typeof rawItem === 'object' && rawItem !== null ? rawItem : rawItem);
18321
18324
  value = this.allowObjectBinding ? this.getDataByValue(value) : value;
18322
18325
  if (((!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0) ||
18323
18326
  (this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0))) {
@@ -18349,12 +18352,17 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18349
18352
  const batch = dataArray.slice(currentIndex, endIndex);
18350
18353
  // Use map on the batch
18351
18354
  batch.map((obj) => {
18352
- if (this.value && obj[this.fields.value] != null && Array.isArray(this.value) &&
18353
- ((!this.allowObjectBinding && this.value.indexOf(obj[this.fields.value]) < 0) ||
18354
- (this.allowObjectBinding && !this.isObjectInArray(obj[this.fields.value], this.value)))) {
18355
- const value = obj[this.fields.value];
18356
- const text = (obj[this.fields.text]).toString();
18357
- this.dispatchSelect(value, event, null, false, length, obj, text);
18355
+ const isPlainValue = typeof obj !== 'object' || obj === null;
18356
+ const value = isPlainValue
18357
+ ? obj
18358
+ : (this.fields.value ? obj[this.fields.value] : obj);
18359
+ const text = isPlainValue
18360
+ ? String(obj)
18361
+ : (this.fields.text ? (obj[this.fields.text]).toString() : String(obj));
18362
+ if (this.value && value != null && Array.isArray(this.value) &&
18363
+ ((!this.allowObjectBinding && this.value.indexOf(value) < 0) ||
18364
+ (this.allowObjectBinding && !this.isObjectInArray(value, this.value)))) {
18365
+ this.dispatchSelect(value, event, null, false, length, isPlainValue ? null : obj, text);
18358
18366
  }
18359
18367
  });
18360
18368
  currentIndex = endIndex;