@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.
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +31 -9
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +32 -9
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/drop-down-base/drop-down-base.js +2 -1
- package/src/drop-down-list/drop-down-list.js +6 -4
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +13 -0
- package/src/list-box/list-box.js +0 -1
- package/src/multi-select/multi-select.js +11 -3
- package/styles/bds-lite.css +2 -2
- package/styles/bds.css +4 -4
- package/styles/multi-select/_bds-definition.scss +4 -4
- package/styles/multi-select/bds.css +4 -4
|
@@ -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
|
}
|
|
@@ -5704,7 +5705,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5704
5705
|
}
|
|
5705
5706
|
else if (this.enableVirtualization && this.getModuleName() !== 'autocomplete' && !this.isFiltering()) {
|
|
5706
5707
|
var value = this.getItemData().value;
|
|
5707
|
-
this.activeIndex = this.getIndexByValue(value);
|
|
5708
|
+
this.activeIndex = !isNullOrUndefined(value) ? this.getIndexByValue(value) : this.activeIndex;
|
|
5708
5709
|
var element = this.findListElement(this.list, 'li', 'data-value', value);
|
|
5709
5710
|
this.selectedLI = element;
|
|
5710
5711
|
element = null;
|
|
@@ -6942,14 +6943,16 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6942
6943
|
if (this.enableVirtualization) {
|
|
6943
6944
|
this.listItemHeight = this.getListHeight();
|
|
6944
6945
|
this.getSkeletonCount();
|
|
6946
|
+
this.skeletonCount = this.totalItemCount < (this.itemCount * 2) && ((!(this.dataSource instanceof DataManager)) ||
|
|
6947
|
+
((this.dataSource instanceof DataManager) && (this.totalItemCount <= this.itemCount))) ? 0 : this.skeletonCount;
|
|
6945
6948
|
this.updateVirtualizationProperties(this.itemCount, this.allowFiltering);
|
|
6946
|
-
if (this.index !== null) {
|
|
6947
|
-
this.activeIndex = this.index + this.skeletonCount;
|
|
6948
|
-
}
|
|
6949
6949
|
}
|
|
6950
6950
|
this.initValue();
|
|
6951
6951
|
this.selectedValueInfo = this.viewPortInfo;
|
|
6952
6952
|
if (this.enableVirtualization) {
|
|
6953
|
+
if (this.index !== null) {
|
|
6954
|
+
this.activeIndex = this.index + this.skeletonCount;
|
|
6955
|
+
}
|
|
6953
6956
|
this.activeIndex = this.activeIndex + this.skeletonCount;
|
|
6954
6957
|
}
|
|
6955
6958
|
}
|
|
@@ -8274,6 +8277,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8274
8277
|
// Specifies if the checkAll method has been called
|
|
8275
8278
|
_this.isCheckAllCalled = false;
|
|
8276
8279
|
_this.isFromFilterChange = false;
|
|
8280
|
+
_this.fallbackValue = [];
|
|
8277
8281
|
return _this;
|
|
8278
8282
|
}
|
|
8279
8283
|
/**
|
|
@@ -9524,6 +9528,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9524
9528
|
};
|
|
9525
9529
|
DropDownTree.prototype.setTreeValue = function () {
|
|
9526
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
|
+
}
|
|
9527
9535
|
var data = void 0;
|
|
9528
9536
|
if (this.showCheckBox || this.allowMultiSelection) {
|
|
9529
9537
|
for (var i = this.value.length - 1; i >= 0; i--) {
|
|
@@ -11177,6 +11185,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
11177
11185
|
* @private
|
|
11178
11186
|
*/
|
|
11179
11187
|
DropDownTree.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
11188
|
+
var _this = this;
|
|
11180
11189
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
11181
11190
|
var prop = _a[_i];
|
|
11182
11191
|
switch (prop) {
|
|
@@ -11197,6 +11206,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
11197
11206
|
break;
|
|
11198
11207
|
case 'fields':
|
|
11199
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);
|
|
11200
11216
|
break;
|
|
11201
11217
|
case 'readonly':
|
|
11202
11218
|
Input.setReadonly(newProp.readonly, this.inputEle);
|
|
@@ -14188,7 +14204,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14188
14204
|
else {
|
|
14189
14205
|
this.updateActionList(ulElement, list, e);
|
|
14190
14206
|
}
|
|
14191
|
-
if (this.dataSource instanceof DataManager && this.allowCustomValue && !this.isCustomRendered &&
|
|
14207
|
+
if (this.dataSource instanceof DataManager && this.allowCustomValue && (!this.isCustomRendered || this.enableVirtualization) &&
|
|
14192
14208
|
this.inputElement.value && this.inputElement.value !== '') {
|
|
14193
14209
|
var query = new Query();
|
|
14194
14210
|
query = this.allowFiltering ? query.where(this.fields.text, 'startswith', this.inputElement.value, this.ignoreCase, this.ignoreAccent) : query;
|
|
@@ -14712,7 +14728,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14712
14728
|
if (this.enableVirtualization) {
|
|
14713
14729
|
this.virtualCustomData = dataItem_1;
|
|
14714
14730
|
var tempData = this.dataSource instanceof DataManager ?
|
|
14715
|
-
JSON.parse(JSON.stringify(this.
|
|
14731
|
+
JSON.parse(JSON.stringify(this.mainData)) : JSON.parse(JSON.stringify(this.dataSource));
|
|
14716
14732
|
var totalData = [];
|
|
14717
14733
|
if (this.virtualCustomSelectData && this.virtualCustomSelectData.length > 0) {
|
|
14718
14734
|
totalData = tempData.concat(this.virtualCustomSelectData);
|
|
@@ -17638,7 +17654,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17638
17654
|
this.allowCustomValue &&
|
|
17639
17655
|
((!(this.dataSource instanceof DataManager)) ||
|
|
17640
17656
|
(this.dataSource instanceof DataManager && isInitialVirtualData)))) {
|
|
17641
|
-
var indexItem = this.listData.length;
|
|
17657
|
+
var indexItem = this.dataSource instanceof DataManager ? this.totalItemCount : this.listData.length;
|
|
17642
17658
|
var newValue = {};
|
|
17643
17659
|
setValue(this.fields.text, value_2, newValue);
|
|
17644
17660
|
setValue(this.fields.value, value_2, newValue);
|
|
@@ -19134,6 +19150,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19134
19150
|
if (this.fields.disabled) {
|
|
19135
19151
|
this.removeDisabledItemsValue(this.value);
|
|
19136
19152
|
}
|
|
19153
|
+
if (this.enableVirtualization && !isNullOrUndefined(oldProp.value) && !isNullOrUndefined(newProp.value)
|
|
19154
|
+
&& !this.validateValues(newProp.value, oldProp.value)) {
|
|
19155
|
+
return;
|
|
19156
|
+
}
|
|
19137
19157
|
this.updateVal(this.value, oldProp.value, 'value', this.enableVirtualization);
|
|
19138
19158
|
this.addValidInputClass();
|
|
19139
19159
|
if (!this.closePopupOnSelect && this.isPopupOpen()) {
|
|
@@ -20113,6 +20133,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
20113
20133
|
}, 100);
|
|
20114
20134
|
_this.initStatus = true;
|
|
20115
20135
|
}
|
|
20136
|
+
else {
|
|
20137
|
+
_this.initialValueUpdate(_this.value, true, isInitialRender);
|
|
20138
|
+
_this.initialUpdate();
|
|
20139
|
+
}
|
|
20116
20140
|
});
|
|
20117
20141
|
}
|
|
20118
20142
|
else {
|
|
@@ -21389,7 +21413,6 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21389
21413
|
this.list.classList.add('e-wrapper');
|
|
21390
21414
|
this.list.classList.add('e-lib');
|
|
21391
21415
|
if (this.element.tagName === 'EJS-LISTBOX') {
|
|
21392
|
-
this.element.setAttribute('tabindex', '0');
|
|
21393
21416
|
if (this.initLoad) {
|
|
21394
21417
|
this.element.appendChild(this.list);
|
|
21395
21418
|
}
|