@syncfusion/ej2-dropdowns 29.2.8 → 29.2.10
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 +53 -11
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +60 -17
- 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 +1 -1
- package/src/drop-down-base/drop-down-base.js +1 -1
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +5 -0
- package/src/multi-select/multi-select.js +54 -16
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 29.2.
|
|
3
|
+
* version : 29.2.10
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2024. 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
|
@@ -500,7 +500,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
500
500
|
isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
if (this.getModuleName() === 'multiselect') {
|
|
503
|
+
if (this.getModuleName() === 'multiselect' && !this.isVirtualReorder && !isContainSkeleton.firstChild.classList.contains('e-reorder')) {
|
|
504
504
|
for (var i = 0; i < totalSkeletonCount && this.totalItemCount !== this.viewPortInfo.endIndex; i++) {
|
|
505
505
|
var liElement = this.createElement('li', { className: dropDownBaseClasses.virtualList + " e-virtual-list-end", styles: 'overflow: inherit' });
|
|
506
506
|
if (this.isVirtualizationEnabled && this.itemTemplate) {
|
|
@@ -336,6 +336,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
336
336
|
private isCheckAllCalled;
|
|
337
337
|
private isFromFilterChange;
|
|
338
338
|
private valueTemplateContainer;
|
|
339
|
+
private previousFilterText;
|
|
339
340
|
/**
|
|
340
341
|
* Specifies the template that renders to the popup list content of the
|
|
341
342
|
* Dropdown Tree component when the data fetch request from the remote server fails.
|
|
@@ -498,6 +498,11 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
_this.treeObj.fields = _this.getTreeFields(fields);
|
|
501
|
+
if ((_this.previousFilterText && _this.previousFilterText !== '' && args.text !== '' && _this.previousFilterText.indexOf(args.text) !== -1) ||
|
|
502
|
+
(args.text && args.text !== '' && _this.previousFilterText !== '' && args.text.indexOf(_this.previousFilterText) !== -1)) {
|
|
503
|
+
_this.isFilterRestore = true;
|
|
504
|
+
}
|
|
505
|
+
_this.previousFilterText = args.text;
|
|
501
506
|
_this.treeObj.dataBind();
|
|
502
507
|
if (_this.popupObj) {
|
|
503
508
|
_this.popupObj.refreshPosition();
|
|
@@ -310,8 +310,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
310
310
|
else {
|
|
311
311
|
this.resetList(this.dataSource, this.fields, query);
|
|
312
312
|
}
|
|
313
|
-
this.isVirtualReorder = false;
|
|
314
313
|
this.UpdateSkeleton();
|
|
314
|
+
this.isVirtualReorder = false;
|
|
315
315
|
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
316
316
|
this.virtualItemCount = this.itemCount;
|
|
317
317
|
if (this.mode !== 'CheckBox') {
|
|
@@ -614,8 +614,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
614
614
|
if (!isNullOrUndefined(this.value)) {
|
|
615
615
|
valuecheck = this.presentItemValue(this.ulElement);
|
|
616
616
|
}
|
|
617
|
+
var isContainsValue = valuecheck.some(function (item) { return item !== null; });
|
|
617
618
|
if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
618
|
-
&& this.listData != null &&
|
|
619
|
+
&& this.listData != null && isContainsValue) {
|
|
619
620
|
this.isaddNonPresentItems = true;
|
|
620
621
|
this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
|
|
621
622
|
this.isaddNonPresentItems = false;
|
|
@@ -899,9 +900,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
899
900
|
return this.virtualFilterQuery(filterQuery);
|
|
900
901
|
}
|
|
901
902
|
if (this.virtualSelectAll) {
|
|
902
|
-
return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ?
|
|
903
|
-
this.query.take(this.maximumSelectionLength).requiresCount() :
|
|
904
|
-
new Query().take(this.maximumSelectionLength).requiresCount();
|
|
903
|
+
return query ? query.skip(0).take(this.maximumSelectionLength).requiresCount() : this.query ?
|
|
904
|
+
this.query.skip(0).take(this.maximumSelectionLength).requiresCount() :
|
|
905
|
+
new Query().skip(0).take(this.maximumSelectionLength).requiresCount();
|
|
905
906
|
}
|
|
906
907
|
return filterQuery;
|
|
907
908
|
}
|
|
@@ -5460,8 +5461,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5460
5461
|
});
|
|
5461
5462
|
};
|
|
5462
5463
|
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
|
|
5464
|
+
var _this = this;
|
|
5463
5465
|
if (!this.list) {
|
|
5464
5466
|
this.onLoadSelect();
|
|
5467
|
+
if (this.enableVirtualization) {
|
|
5468
|
+
this.setProperties({ text: '' }, true);
|
|
5469
|
+
this.checkInitialValue();
|
|
5470
|
+
}
|
|
5465
5471
|
}
|
|
5466
5472
|
else if ((this.dataSource instanceof DataManager) && (!this.listData || !(this.mainList && this.mainData))) {
|
|
5467
5473
|
this.onLoadSelect();
|
|
@@ -5471,8 +5477,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5471
5477
|
if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
|
|
5472
5478
|
valuecheck = this.presentItemValue(this.ulElement);
|
|
5473
5479
|
}
|
|
5480
|
+
var isContainsValue = valuecheck.some(function (item) { return item !== null; });
|
|
5474
5481
|
if (prop === 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
5475
|
-
&& this.listData != null) {
|
|
5482
|
+
&& this.listData != null && isContainsValue) {
|
|
5476
5483
|
this.mainData = null;
|
|
5477
5484
|
this.setDynValue = true;
|
|
5478
5485
|
this.isaddNonPresentItems = true;
|
|
@@ -5500,10 +5507,41 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5500
5507
|
this.initialValueUpdate(this.dataSource, true);
|
|
5501
5508
|
}
|
|
5502
5509
|
else if (!this.isInitRemoteVirtualData) {
|
|
5503
|
-
this.
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5510
|
+
if (this.allowObjectBinding && !isContainsValue && this.value && this.value.length) {
|
|
5511
|
+
var fields = !this.isPrimitiveData ? this.fields.value : '';
|
|
5512
|
+
var predicate = void 0;
|
|
5513
|
+
for (var i = 0; i < this.value.length; i++) {
|
|
5514
|
+
var value = this.allowObjectBinding ?
|
|
5515
|
+
getValue((this.fields.value) ? this.fields.value : '', this.value[i]) :
|
|
5516
|
+
this.value[i];
|
|
5517
|
+
if (i === 0) {
|
|
5518
|
+
predicate = new Predicate(fields, 'equal', value);
|
|
5519
|
+
}
|
|
5520
|
+
else {
|
|
5521
|
+
predicate = predicate.or(fields, 'equal', value);
|
|
5522
|
+
}
|
|
5523
|
+
}
|
|
5524
|
+
if (this.dataSource instanceof DataManager) {
|
|
5525
|
+
this.dataSource.executeQuery(new Query().where(predicate))
|
|
5526
|
+
.then(function (e) {
|
|
5527
|
+
if (e.result.length > 0) {
|
|
5528
|
+
var listItems_2 = e.result;
|
|
5529
|
+
_this.isDynamicRemoteVirtualData = true;
|
|
5530
|
+
setTimeout(function () {
|
|
5531
|
+
_this.initialValueUpdate(listItems_2, true);
|
|
5532
|
+
_this.isDynamicRemoteVirtualData = false;
|
|
5533
|
+
_this.initialUpdate();
|
|
5534
|
+
}, 100);
|
|
5535
|
+
}
|
|
5536
|
+
});
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
else {
|
|
5540
|
+
this.isDynamicRemoteVirtualData = true;
|
|
5541
|
+
this.initialValueUpdate(this.listData, true);
|
|
5542
|
+
this.isDynamicRemoteVirtualData = false;
|
|
5543
|
+
this.initialUpdate();
|
|
5544
|
+
}
|
|
5507
5545
|
}
|
|
5508
5546
|
if (this.mode !== 'Box' && !this.inputFocus) {
|
|
5509
5547
|
this.updateDelimView();
|
|
@@ -6102,7 +6140,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
6102
6140
|
}
|
|
6103
6141
|
if (this.value && this.value.length) {
|
|
6104
6142
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6105
|
-
var
|
|
6143
|
+
var listItems_3;
|
|
6106
6144
|
if (this.enableVirtualization) {
|
|
6107
6145
|
var fields = !this.isPrimitiveData ? this.fields.value : '';
|
|
6108
6146
|
var predicate = void 0;
|
|
@@ -6121,11 +6159,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
6121
6159
|
this.dataSource.executeQuery(new Query().where(predicate))
|
|
6122
6160
|
.then(function (e) {
|
|
6123
6161
|
if (e.result.length > 0) {
|
|
6124
|
-
|
|
6162
|
+
listItems_3 = e.result;
|
|
6125
6163
|
_this.initStatus = false;
|
|
6126
6164
|
_this.isInitRemoteVirtualData = true;
|
|
6127
6165
|
setTimeout(function () {
|
|
6128
|
-
_this.initialValueUpdate(
|
|
6166
|
+
_this.initialValueUpdate(listItems_3, true);
|
|
6129
6167
|
_this.initialUpdate();
|
|
6130
6168
|
_this.isInitRemoteVirtualData = false;
|
|
6131
6169
|
}, 100);
|
|
@@ -6134,18 +6172,18 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
6134
6172
|
});
|
|
6135
6173
|
}
|
|
6136
6174
|
else {
|
|
6137
|
-
|
|
6175
|
+
listItems_3 = new DataManager(this.dataSource).executeLocal(new Query().where(predicate));
|
|
6138
6176
|
}
|
|
6139
6177
|
}
|
|
6140
6178
|
if (!(this.dataSource instanceof DataManager)) {
|
|
6141
|
-
this.initialValueUpdate(
|
|
6179
|
+
this.initialValueUpdate(listItems_3, true);
|
|
6142
6180
|
this.initialUpdate();
|
|
6143
6181
|
}
|
|
6144
6182
|
else {
|
|
6145
6183
|
this.setInitialValue = function () {
|
|
6146
6184
|
_this.initStatus = false;
|
|
6147
6185
|
if (!_this.enableVirtualization || (_this.enableVirtualization && (!(_this.dataSource instanceof DataManager)))) {
|
|
6148
|
-
_this.initialValueUpdate(
|
|
6186
|
+
_this.initialValueUpdate(listItems_3);
|
|
6149
6187
|
}
|
|
6150
6188
|
_this.initialUpdate();
|
|
6151
6189
|
_this.setInitialValue = null;
|