@syncfusion/ej2-dropdowns 33.2.5 → 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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 33.2.5
3
+ * version : 33.2.7
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-dropdowns",
3
- "version": "33.2.5",
3
+ "version": "33.2.7",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -12,9 +12,9 @@
12
12
  "@syncfusion/ej2-data": "~33.2.5",
13
13
  "@syncfusion/ej2-inputs": "~33.2.5",
14
14
  "@syncfusion/ej2-lists": "~33.2.3",
15
- "@syncfusion/ej2-navigations": "~33.2.4",
16
- "@syncfusion/ej2-notifications": "~33.2.3",
17
- "@syncfusion/ej2-popups": "~33.2.5"
15
+ "@syncfusion/ej2-navigations": "~33.2.7",
16
+ "@syncfusion/ej2-notifications": "~33.2.7",
17
+ "@syncfusion/ej2-popups": "~33.2.7"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -2251,7 +2251,8 @@ var DropDownBase = /** @class */ (function (_super) {
2251
2251
  else {
2252
2252
  for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
2253
2253
  var item = _c[_b];
2254
- if (!isNullOrUndefined(item) && getValue((this.fields.value ? this.fields.value : 'value'), item) === value) {
2254
+ if (!isNullOrUndefined(item) && (getValue((this.fields.value ? this.fields.value : 'value'), item) === value
2255
+ || this.getModuleName() === 'multiselect' && this.isVirtualizationEnabled && this.properties.allowCustomValue && getValue((this.fields.value ? this.fields.value : 'value'), item) === value.toString())) {
2255
2256
  return item;
2256
2257
  }
2257
2258
  }
@@ -2467,7 +2467,7 @@ var DropDownList = /** @class */ (function (_super) {
2467
2467
  }
2468
2468
  else if (this.enableVirtualization && this.getModuleName() !== 'autocomplete' && !this.isFiltering()) {
2469
2469
  var value = this.getItemData().value;
2470
- this.activeIndex = this.getIndexByValue(value);
2470
+ this.activeIndex = !isNullOrUndefined(value) ? this.getIndexByValue(value) : this.activeIndex;
2471
2471
  var element = this.findListElement(this.list, 'li', 'data-value', value);
2472
2472
  this.selectedLI = element;
2473
2473
  element = null;
@@ -3707,14 +3707,16 @@ var DropDownList = /** @class */ (function (_super) {
3707
3707
  if (this.enableVirtualization) {
3708
3708
  this.listItemHeight = this.getListHeight();
3709
3709
  this.getSkeletonCount();
3710
+ this.skeletonCount = this.totalItemCount < (this.itemCount * 2) && ((!(this.dataSource instanceof DataManager)) ||
3711
+ ((this.dataSource instanceof DataManager) && (this.totalItemCount <= this.itemCount))) ? 0 : this.skeletonCount;
3710
3712
  this.updateVirtualizationProperties(this.itemCount, this.allowFiltering);
3711
- if (this.index !== null) {
3712
- this.activeIndex = this.index + this.skeletonCount;
3713
- }
3714
3713
  }
3715
3714
  this.initValue();
3716
3715
  this.selectedValueInfo = this.viewPortInfo;
3717
3716
  if (this.enableVirtualization) {
3717
+ if (this.index !== null) {
3718
+ this.activeIndex = this.index + this.skeletonCount;
3719
+ }
3718
3720
  this.activeIndex = this.activeIndex + this.skeletonCount;
3719
3721
  }
3720
3722
  }
@@ -338,6 +338,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
338
338
  private isFromFilterChange;
339
339
  private valueTemplateContainer;
340
340
  private previousFilterText;
341
+ private fallbackValue;
341
342
  /**
342
343
  * Specifies the template that renders to the popup list content of the
343
344
  * Dropdown Tree component when the data fetch request from the remote server fails.
@@ -176,6 +176,7 @@ var DropDownTree = /** @class */ (function (_super) {
176
176
  // Specifies if the checkAll method has been called
177
177
  _this.isCheckAllCalled = false;
178
178
  _this.isFromFilterChange = false;
179
+ _this.fallbackValue = [];
179
180
  return _this;
180
181
  }
181
182
  /**
@@ -1444,6 +1445,10 @@ var DropDownTree = /** @class */ (function (_super) {
1444
1445
  };
1445
1446
  DropDownTree.prototype.setTreeValue = function () {
1446
1447
  if (this.value !== null && this.value.length !== 0) {
1448
+ var dataReady = this.treeItems && this.treeItems.length > 0;
1449
+ if (!dataReady && this.fallbackValue.length === 0) {
1450
+ this.fallbackValue = this.value.slice();
1451
+ }
1447
1452
  var data = void 0;
1448
1453
  if (this.showCheckBox || this.allowMultiSelection) {
1449
1454
  for (var i = this.value.length - 1; i >= 0; i--) {
@@ -3097,6 +3102,7 @@ var DropDownTree = /** @class */ (function (_super) {
3097
3102
  * @private
3098
3103
  */
3099
3104
  DropDownTree.prototype.onPropertyChanged = function (newProp, oldProp) {
3105
+ var _this = this;
3100
3106
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
3101
3107
  var prop = _a[_i];
3102
3108
  switch (prop) {
@@ -3117,6 +3123,13 @@ var DropDownTree = /** @class */ (function (_super) {
3117
3123
  break;
3118
3124
  case 'fields':
3119
3125
  this.setFields();
3126
+ setTimeout(function () {
3127
+ if (_this.value.length === 0 && _this.fallbackValue.length > 0) {
3128
+ _this.value = _this.fallbackValue;
3129
+ _this.updateValue(_this.fallbackValue);
3130
+ _this.fallbackValue = [];
3131
+ }
3132
+ }, 1);
3120
3133
  break;
3121
3134
  case 'readonly':
3122
3135
  Input.setReadonly(newProp.readonly, this.inputEle);
@@ -161,7 +161,6 @@ var ListBox = /** @class */ (function (_super) {
161
161
  this.list.classList.add('e-wrapper');
162
162
  this.list.classList.add('e-lib');
163
163
  if (this.element.tagName === 'EJS-LISTBOX') {
164
- this.element.setAttribute('tabindex', '0');
165
164
  if (this.initLoad) {
166
165
  this.element.appendChild(this.list);
167
166
  }
@@ -646,7 +646,7 @@ var MultiSelect = /** @class */ (function (_super) {
646
646
  else {
647
647
  this.updateActionList(ulElement, list, e);
648
648
  }
649
- if (this.dataSource instanceof DataManager && this.allowCustomValue && !this.isCustomRendered &&
649
+ if (this.dataSource instanceof DataManager && this.allowCustomValue && (!this.isCustomRendered || this.enableVirtualization) &&
650
650
  this.inputElement.value && this.inputElement.value !== '') {
651
651
  var query = new Query();
652
652
  query = this.allowFiltering ? query.where(this.fields.text, 'startswith', this.inputElement.value, this.ignoreCase, this.ignoreAccent) : query;
@@ -1173,7 +1173,7 @@ var MultiSelect = /** @class */ (function (_super) {
1173
1173
  if (this.enableVirtualization) {
1174
1174
  this.virtualCustomData = dataItem_1;
1175
1175
  var tempData = this.dataSource instanceof DataManager ?
1176
- JSON.parse(JSON.stringify(this.listData)) : JSON.parse(JSON.stringify(this.dataSource));
1176
+ JSON.parse(JSON.stringify(this.mainData)) : JSON.parse(JSON.stringify(this.dataSource));
1177
1177
  var totalData = [];
1178
1178
  if (this.virtualCustomSelectData && this.virtualCustomSelectData.length > 0) {
1179
1179
  totalData = tempData.concat(this.virtualCustomSelectData);
@@ -4101,7 +4101,7 @@ var MultiSelect = /** @class */ (function (_super) {
4101
4101
  this.allowCustomValue &&
4102
4102
  ((!(this.dataSource instanceof DataManager)) ||
4103
4103
  (this.dataSource instanceof DataManager && isInitialVirtualData)))) {
4104
- var indexItem = this.listData.length;
4104
+ var indexItem = this.dataSource instanceof DataManager ? this.totalItemCount : this.listData.length;
4105
4105
  var newValue = {};
4106
4106
  setValue(this.fields.text, value_2, newValue);
4107
4107
  setValue(this.fields.value, value_2, newValue);
@@ -5597,6 +5597,10 @@ var MultiSelect = /** @class */ (function (_super) {
5597
5597
  if (this.fields.disabled) {
5598
5598
  this.removeDisabledItemsValue(this.value);
5599
5599
  }
5600
+ if (this.enableVirtualization && !isNullOrUndefined(oldProp.value) && !isNullOrUndefined(newProp.value)
5601
+ && !this.validateValues(newProp.value, oldProp.value)) {
5602
+ return;
5603
+ }
5600
5604
  this.updateVal(this.value, oldProp.value, 'value', this.enableVirtualization);
5601
5605
  this.addValidInputClass();
5602
5606
  if (!this.closePopupOnSelect && this.isPopupOpen()) {
@@ -6576,6 +6580,10 @@ var MultiSelect = /** @class */ (function (_super) {
6576
6580
  }, 100);
6577
6581
  _this.initStatus = true;
6578
6582
  }
6583
+ else {
6584
+ _this.initialValueUpdate(_this.value, true, isInitialRender);
6585
+ _this.initialUpdate();
6586
+ }
6579
6587
  });
6580
6588
  }
6581
6589
  else {
@@ -1597,7 +1597,7 @@ ejs-dropdownlist {
1597
1597
  box-sizing: border-box;
1598
1598
  cursor: text;
1599
1599
  line-height: normal;
1600
- min-height: 28px;
1600
+ min-height: 30px;
1601
1601
  padding: 0 32px 0 0;
1602
1602
  position: relative;
1603
1603
  -webkit-user-select: none;
@@ -2181,7 +2181,7 @@ ejs-multiselect {
2181
2181
  }
2182
2182
 
2183
2183
  .e-small .e-multi-select-wrapper {
2184
- min-height: 24px;
2184
+ min-height: 26px;
2185
2185
  }
2186
2186
 
2187
2187
  .e-small .e-multi-select-wrapper.e-delimiter .e-searcher,
package/styles/bds.css CHANGED
@@ -2081,7 +2081,7 @@ ejs-dropdownlist {
2081
2081
  box-sizing: border-box;
2082
2082
  cursor: text;
2083
2083
  line-height: normal;
2084
- min-height: 28px;
2084
+ min-height: 30px;
2085
2085
  padding: 0 32px 0 0;
2086
2086
  position: relative;
2087
2087
  -webkit-user-select: none;
@@ -2665,7 +2665,7 @@ ejs-multiselect {
2665
2665
  }
2666
2666
 
2667
2667
  .e-small .e-multi-select-wrapper {
2668
- min-height: 24px;
2668
+ min-height: 26px;
2669
2669
  }
2670
2670
 
2671
2671
  .e-small .e-multi-select-wrapper.e-delimiter .e-searcher,
@@ -3139,7 +3139,7 @@ ejs-multiselect {
3139
3139
  }
3140
3140
 
3141
3141
  .e-bigger .e-multi-select-wrapper {
3142
- min-height: 36px;
3142
+ min-height: 40px;
3143
3143
  }
3144
3144
 
3145
3145
  .e-bigger .e-multi-select-wrapper .e-chips {
@@ -3297,7 +3297,7 @@ ejs-multiselect {
3297
3297
  }
3298
3298
 
3299
3299
  .e-bigger.e-small .e-multi-select-wrapper {
3300
- min-height: 28px;
3300
+ min-height: 34px;
3301
3301
  }
3302
3302
 
3303
3303
  .e-bigger.e-small .e-multi-select-wrapper input[type=text] {
@@ -34,8 +34,8 @@ $ddl-chip-collection-top: 0 !default;
34
34
  $ddl-input-height: 28px !default;
35
35
  $ddl-input-bigger-height: 36px !default;
36
36
  $ddl-input-mob-height: 30px !default;
37
- $ddl-control-height: 28px !default;
38
- $ddl-control-bigger-height: 36px !default;
37
+ $ddl-control-height: 30px !default;
38
+ $ddl-control-bigger-height: 40px !default;
39
39
  $ddl-delimviewheight: 28px !default;
40
40
  $ddl-delimviewheight-bigger: 36px !default;
41
41
  $ddl-closer-hooker-font: $text-lg !default;
@@ -190,7 +190,7 @@ $ddl-chip-small-font-size: $text-xs !default;
190
190
  $ddl-small-chip-close-square: $text-sm !default;
191
191
  $ddl-small-chip-close-width: $text-sm !default;
192
192
  $ddl-small-chip-close-font: $text-sm !default;
193
- $ddl-control-small-height: 24px !default;
193
+ $ddl-control-small-height: 26px !default;
194
194
  $ddl-small-input-height: 24px !default;
195
195
  $ddl-delim-small-font-size: $text-xs !default;
196
196
  $ddl-small-closer-margin-top: -1.65em !default;
@@ -213,7 +213,7 @@ $ddl-bigger-small-chip-height: 26px !default;
213
213
  $ddl-bigger-small-chip-close-square: $text-lg !default;
214
214
  $ddl-bigger-small-chip-close-width: $text-lg !default;
215
215
  $ddl-bigger-small-chip-close-font: $text-lg !default;
216
- $ddl-control-bigger-small-height: 28px !default;
216
+ $ddl-control-bigger-small-height: 34px !default;
217
217
  $ddl-bigger-small-input-height: 32px !default;
218
218
  $ddl-delim-bigger-small-font-size: $text-sm !default;
219
219
  $ddl-delimviewheight-bigger-small: 32px !default;
@@ -348,7 +348,7 @@
348
348
  box-sizing: border-box;
349
349
  cursor: text;
350
350
  line-height: normal;
351
- min-height: 28px;
351
+ min-height: 30px;
352
352
  padding: 0 32px 0 0;
353
353
  position: relative;
354
354
  -webkit-user-select: none;
@@ -932,7 +932,7 @@ ejs-multiselect {
932
932
  }
933
933
 
934
934
  .e-small .e-multi-select-wrapper {
935
- min-height: 24px;
935
+ min-height: 26px;
936
936
  }
937
937
 
938
938
  .e-small .e-multi-select-wrapper.e-delimiter .e-searcher,
@@ -1406,7 +1406,7 @@ ejs-multiselect {
1406
1406
  }
1407
1407
 
1408
1408
  .e-bigger .e-multi-select-wrapper {
1409
- min-height: 36px;
1409
+ min-height: 40px;
1410
1410
  }
1411
1411
 
1412
1412
  .e-bigger .e-multi-select-wrapper .e-chips {
@@ -1564,7 +1564,7 @@ ejs-multiselect {
1564
1564
  }
1565
1565
 
1566
1566
  .e-bigger.e-small .e-multi-select-wrapper {
1567
- min-height: 28px;
1567
+ min-height: 34px;
1568
1568
  }
1569
1569
 
1570
1570
  .e-bigger.e-small .e-multi-select-wrapper input[type=text] {