@syncfusion/ej2-dropdowns 25.1.40 → 25.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.
- package/CHANGELOG.md +22 -0
- 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 +280 -166
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +279 -165
- 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 +12 -12
- package/src/auto-complete/auto-complete.js +2 -10
- package/src/combo-box/combo-box.js +1 -1
- package/src/common/interface.d.ts +2 -0
- package/src/common/virtual-scroll.js +13 -4
- package/src/drop-down-base/drop-down-base.d.ts +3 -0
- package/src/drop-down-base/drop-down-base.js +67 -42
- package/src/drop-down-list/drop-down-list.d.ts +1 -1
- package/src/drop-down-list/drop-down-list.js +37 -27
- package/src/list-box/list-box.js +1 -6
- package/src/multi-select/multi-select.d.ts +3 -1
- package/src/multi-select/multi-select.js +157 -68
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 25.
|
|
3
|
+
* version : 25.2.3
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@25.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@25.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-On8qX7S8gJBKOTXOZA3mxvgeMWddeEfTrT0865OaRJzRlgEzf4eJyWLmzezwbj/MFre2kOOlANZMoBNwcru1FA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-25.1.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-25.1.41.tgz",
|
|
38
|
+
"_shasum": "e940c2f1e02df58251d717afec8786f77e2ca07c",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~25.
|
|
47
|
-
"@syncfusion/ej2-data": "~25.
|
|
48
|
-
"@syncfusion/ej2-inputs": "~25.
|
|
49
|
-
"@syncfusion/ej2-lists": "~25.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~25.
|
|
51
|
-
"@syncfusion/ej2-notifications": "~25.
|
|
52
|
-
"@syncfusion/ej2-popups": "~25.
|
|
46
|
+
"@syncfusion/ej2-base": "~25.2.3",
|
|
47
|
+
"@syncfusion/ej2-data": "~25.2.3",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~25.2.3",
|
|
49
|
+
"@syncfusion/ej2-lists": "~25.2.3",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~25.2.3",
|
|
51
|
+
"@syncfusion/ej2-notifications": "~25.2.3",
|
|
52
|
+
"@syncfusion/ej2-popups": "~25.2.3"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"module": "./index.js",
|
|
75
75
|
"name": "@syncfusion/ej2-dropdowns",
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "25.
|
|
77
|
+
"version": "25.2.3",
|
|
78
78
|
"sideEffects": false,
|
|
79
79
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
80
80
|
}
|
|
@@ -90,7 +90,7 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
90
90
|
if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {
|
|
91
91
|
filterQuery.where('', filterType, queryString, this.ignoreCase, this.ignoreAccent);
|
|
92
92
|
}
|
|
93
|
-
else
|
|
93
|
+
else {
|
|
94
94
|
var mapping = !isNullOrUndefined(this.fields.value) ? this.fields.value : '';
|
|
95
95
|
filterQuery.where(mapping, filterType, queryString, this.ignoreCase, this.ignoreAccent);
|
|
96
96
|
}
|
|
@@ -106,7 +106,7 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
106
106
|
}
|
|
107
107
|
filterQuery.take(this.suggestionCount);
|
|
108
108
|
}
|
|
109
|
-
if (this.enableVirtualization
|
|
109
|
+
if (this.enableVirtualization) {
|
|
110
110
|
var queryTakeValue = 0;
|
|
111
111
|
var querySkipValue = 0;
|
|
112
112
|
var takeValue = this.getTakeValue();
|
|
@@ -156,14 +156,6 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
156
156
|
}
|
|
157
157
|
filterQuery.requiresCount();
|
|
158
158
|
}
|
|
159
|
-
else if (this.enableVirtualization && (this.dataSource instanceof DataManager && !this.virtualGroupDataSource)) {
|
|
160
|
-
for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
|
|
161
|
-
if (filterQuery.queries[queryElements].fn === 'onSkip' || filterQuery.queries[queryElements].fn === 'onTake') {
|
|
162
|
-
filterQuery.queries.splice(queryElements, 1);
|
|
163
|
-
--queryElements;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
159
|
return filterQuery;
|
|
168
160
|
};
|
|
169
161
|
AutoComplete.prototype.searchLists = function (e) {
|
|
@@ -151,7 +151,7 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
151
151
|
if (this.enableVirtualization && this.value) {
|
|
152
152
|
var fields = (this.fields.value) ? this.fields.value : '';
|
|
153
153
|
var currentValue_1 = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
154
|
-
if (this.dataSource instanceof DataManager
|
|
154
|
+
if (this.dataSource instanceof DataManager) {
|
|
155
155
|
var getItem = new DataManager(this.virtualGroupDataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', currentValue_1)));
|
|
156
156
|
if (getItem && getItem.length > 0) {
|
|
157
157
|
this.itemData = getItem[0];
|
|
@@ -47,6 +47,8 @@ export interface IDropdownlist extends Component<HTMLElement> {
|
|
|
47
47
|
allowFiltering: boolean;
|
|
48
48
|
isPopupOpen: boolean;
|
|
49
49
|
isTyped: boolean;
|
|
50
|
+
setCurrentView: boolean;
|
|
51
|
+
isRequesting: boolean;
|
|
50
52
|
itemCount: number;
|
|
51
53
|
fields: FieldSettingsModel;
|
|
52
54
|
generatedDataObject: GeneratedData;
|
|
@@ -198,9 +198,10 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
198
198
|
var query = this.parent.getForQuery(this.parent.value).clone();
|
|
199
199
|
query = query.skip(0).take(this.parent.itemCount - (this.parent.value.length - this.parent.viewPortInfo.startIndex));
|
|
200
200
|
this.parent.appendUncheckList = true;
|
|
201
|
+
this.parent.setCurrentView = false;
|
|
201
202
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
202
203
|
isListUpdated = false;
|
|
203
|
-
this.parent.appendUncheckList = false;
|
|
204
|
+
this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
|
|
204
205
|
isListUpdated = false;
|
|
205
206
|
}
|
|
206
207
|
else {
|
|
@@ -223,9 +224,10 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
223
224
|
var query = this.parent.getForQuery(this.parent.value).clone();
|
|
224
225
|
query = query.skip(0).take(this.parent.itemCount - (this.parent.value.length - this.parent.viewPortInfo.startIndex));
|
|
225
226
|
this.parent.appendUncheckList = true;
|
|
227
|
+
this.parent.setCurrentView = false;
|
|
226
228
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
227
229
|
isListUpdated = false;
|
|
228
|
-
this.parent.appendUncheckList = false;
|
|
230
|
+
this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
|
|
229
231
|
}
|
|
230
232
|
}
|
|
231
233
|
else {
|
|
@@ -236,6 +238,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
236
238
|
var query = this.parent.getForQuery(this.parent.value).clone();
|
|
237
239
|
var skipvalue = this.parent.viewPortInfo.startIndex - this.parent.value.length >= 0 ? this.parent.viewPortInfo.startIndex - this.parent.value.length : 0;
|
|
238
240
|
query = query.skip(skipvalue);
|
|
241
|
+
this.parent.setCurrentView = false;
|
|
239
242
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
240
243
|
isListUpdated = false;
|
|
241
244
|
}
|
|
@@ -257,6 +260,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
257
260
|
else {
|
|
258
261
|
query = query.skip(this.parent.viewPortInfo.startIndex);
|
|
259
262
|
}
|
|
263
|
+
this.parent.setCurrentView = false;
|
|
260
264
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
261
265
|
isResetListCalled = true;
|
|
262
266
|
break;
|
|
@@ -278,6 +282,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
278
282
|
else {
|
|
279
283
|
query = query.skip(this.parent.viewPortInfo.startIndex);
|
|
280
284
|
}
|
|
285
|
+
this.parent.setCurrentView = false;
|
|
281
286
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
282
287
|
isResetListCalled = true;
|
|
283
288
|
}
|
|
@@ -289,6 +294,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
289
294
|
currentData.push(alreadyAddedData[0]);
|
|
290
295
|
}
|
|
291
296
|
}
|
|
297
|
+
this.parent.setCurrentView = false;
|
|
292
298
|
}
|
|
293
299
|
}
|
|
294
300
|
if (!isResetListCalled && isListUpdated) {
|
|
@@ -356,6 +362,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
356
362
|
if (isStartIndexInitialised && !((this.parent.totalItemCount == queryStartIndex) && (this.parent.totalItemCount == queryEndIndex))) {
|
|
357
363
|
this.parent.virtualItemStartIndex = queryStartIndex;
|
|
358
364
|
this.parent.virtualItemEndIndex = queryEndIndex;
|
|
365
|
+
this.parent.setCurrentView = true;
|
|
359
366
|
this.generateAndExecuteQueryAsync(query, queryStartIndex, queryEndIndex);
|
|
360
367
|
if (this.component === 'multiselect' && this.parent.hideSelectedItem && this.parent.value && Array.isArray(this.parent.value) && this.parent.value.length > 0) {
|
|
361
368
|
this.parent.totalItemsCount();
|
|
@@ -365,7 +372,9 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
365
372
|
this.parent.virtualItemEndIndex = this.parent.viewPortInfo.endIndex;
|
|
366
373
|
}
|
|
367
374
|
}
|
|
368
|
-
this.
|
|
375
|
+
if (!(this.parent.dataSource instanceof DataManager) || (this.parent.dataSource instanceof DataManager && !this.parent.isRequesting)) {
|
|
376
|
+
this.setCurrentViewDataAsync();
|
|
377
|
+
}
|
|
369
378
|
};
|
|
370
379
|
VirtualScroll.prototype.dataProcessAsync = function (isOpenPopup) {
|
|
371
380
|
this.parent.selectedValueInfo = null;
|
|
@@ -398,7 +407,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
398
407
|
return [4 /*yield*/, this.dataProcessAsync()];
|
|
399
408
|
case 1:
|
|
400
409
|
_a.sent();
|
|
401
|
-
if (this.parent.keyboardEvent != null) {
|
|
410
|
+
if (this.parent.keyboardEvent != null && (!(this.parent.dataSource instanceof DataManager) || (this.parent.dataSource instanceof DataManager && !this.parent.isRequesting))) {
|
|
402
411
|
this.parent.handleVirtualKeyboardActions(this.parent.keyboardEvent, this.parent.pageCount);
|
|
403
412
|
}
|
|
404
413
|
if (!this.parent.customFilterQuery) {
|
|
@@ -233,6 +233,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
233
233
|
private isCheckBoxSelection;
|
|
234
234
|
protected totalItemCount: number;
|
|
235
235
|
protected dataCount: number;
|
|
236
|
+
protected remoteDataCount: number;
|
|
236
237
|
protected isRemoteDataUpdated: boolean;
|
|
237
238
|
protected virtualGroupDataSource: {
|
|
238
239
|
[key: string]: Object;
|
|
@@ -277,6 +278,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
277
278
|
protected appendUncheckList: boolean;
|
|
278
279
|
protected getInitialData: boolean;
|
|
279
280
|
protected preventPopupOpen: boolean;
|
|
281
|
+
protected setCurrentView: boolean;
|
|
280
282
|
protected customFilterQuery: Query;
|
|
281
283
|
protected virtualSelectAllData: {
|
|
282
284
|
[key: string]: Object;
|
|
@@ -563,6 +565,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
563
565
|
* @returns {void}
|
|
564
566
|
*/
|
|
565
567
|
private setListData;
|
|
568
|
+
protected handleVirtualKeyboardActions(e: KeyboardEventArgs, pageCount: number): void;
|
|
566
569
|
protected updatePopupState(): void;
|
|
567
570
|
protected updateRemoteData(): void;
|
|
568
571
|
private bindChildItems;
|
|
@@ -100,9 +100,10 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
100
100
|
_this.isCheckBoxSelection = false;
|
|
101
101
|
_this.totalItemCount = 0;
|
|
102
102
|
_this.dataCount = 0;
|
|
103
|
+
_this.remoteDataCount = -1;
|
|
103
104
|
_this.isRemoteDataUpdated = false;
|
|
104
105
|
_this.isIncrementalRequest = false;
|
|
105
|
-
_this.itemCount =
|
|
106
|
+
_this.itemCount = 30;
|
|
106
107
|
_this.virtualListHeight = 0;
|
|
107
108
|
_this.isVirtualScrolling = false;
|
|
108
109
|
_this.isPreventScrollAction = false;
|
|
@@ -129,7 +130,6 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
129
130
|
_this.appendUncheckList = false;
|
|
130
131
|
_this.getInitialData = false;
|
|
131
132
|
_this.preventPopupOpen = true;
|
|
132
|
-
_this.customFilterQuery = new Query();
|
|
133
133
|
_this.virtualListInfo = {
|
|
134
134
|
currentPageNumber: null,
|
|
135
135
|
direction: null,
|
|
@@ -405,10 +405,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
405
405
|
this.virtualListInfo = this.viewPortInfo;
|
|
406
406
|
};
|
|
407
407
|
DropDownBase.prototype.getFilteringSkeletonCount = function () {
|
|
408
|
-
var difference = this.dataCount - this.viewPortInfo.endIndex;
|
|
409
408
|
var currentSkeletonCount = this.skeletonCount;
|
|
410
409
|
this.getSkeletonCount(true);
|
|
411
|
-
this.skeletonCount = this.dataCount > this.itemCount * 2 ? this.skeletonCount :
|
|
410
|
+
this.skeletonCount = this.dataCount > this.itemCount * 2 ? this.skeletonCount : 0;
|
|
412
411
|
var skeletonUpdated = true;
|
|
413
412
|
if ((this.getModuleName() === 'autocomplete' || this.getModuleName() === 'multiselect') && (this.totalItemCount < (this.itemCount * 2))) {
|
|
414
413
|
this.skeletonCount = 0;
|
|
@@ -442,10 +441,10 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
442
441
|
DropDownBase.prototype.getSkeletonCount = function (retainSkeleton) {
|
|
443
442
|
this.virtualListHeight = this.listContainerHeight != null ? parseInt(this.listContainerHeight, 10) : this.virtualListHeight;
|
|
444
443
|
var actualCount = this.virtualListHeight > 0 ? Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
|
|
445
|
-
this.skeletonCount = actualCount *
|
|
444
|
+
this.skeletonCount = actualCount * 4 < this.itemCount ? this.itemCount : actualCount * 4;
|
|
446
445
|
this.itemCount = retainSkeleton ? this.itemCount : this.skeletonCount;
|
|
447
446
|
this.virtualItemCount = this.itemCount;
|
|
448
|
-
this.skeletonCount = Math.floor(this.skeletonCount / 2)
|
|
447
|
+
this.skeletonCount = Math.floor(this.skeletonCount / 2);
|
|
449
448
|
};
|
|
450
449
|
DropDownBase.prototype.GetVirtualTrackHeight = function () {
|
|
451
450
|
var height = this.totalItemCount === this.viewPortInfo.endIndex ? this.totalItemCount * this.listItemHeight - this.itemCount * this.listItemHeight : this.totalItemCount * this.listItemHeight;
|
|
@@ -670,41 +669,53 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
670
669
|
if (!eventArgs.cancel) {
|
|
671
670
|
_this.isRequesting = true;
|
|
672
671
|
_this.showSpinner();
|
|
673
|
-
if (dataSource instanceof DataManager
|
|
672
|
+
if (dataSource instanceof DataManager) {
|
|
674
673
|
_this.isRequested = true;
|
|
674
|
+
var isWhereExist_1 = false;
|
|
675
675
|
if (_this.isDataFetched) {
|
|
676
676
|
_this.emptyDataRequest(fields);
|
|
677
677
|
return;
|
|
678
678
|
}
|
|
679
679
|
eventArgs.data.executeQuery(_this.getQuery(eventArgs.query)).then(function (e) {
|
|
680
680
|
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
681
|
+
var isReOrder = true;
|
|
682
|
+
if (!_this.virtualSelectAll) {
|
|
683
|
+
var newQuery = _this.getQuery(eventArgs.query);
|
|
684
|
+
for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
|
|
685
|
+
if (newQuery.queries[queryElements].fn === 'onWhere') {
|
|
686
|
+
isWhereExist_1 = true;
|
|
686
687
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
688
|
+
}
|
|
689
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
690
|
+
if (_this.isVirtualizationEnabled && (e.count != 0 && e.count < (_this.itemCount * 2))) {
|
|
691
|
+
if (newQuery) {
|
|
692
|
+
for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
|
|
693
|
+
if (newQuery.queries[queryElements].fn === 'onTake') {
|
|
694
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
695
|
+
newQuery.queries[queryElements].e.nos = e.count;
|
|
696
|
+
}
|
|
697
|
+
if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition == 'or' || newQuery.queries[queryElements].e.operator == 'equal')) {
|
|
698
|
+
isReOrder = false;
|
|
699
|
+
}
|
|
692
700
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
704
|
+
_this.isVirtualTrackHeight = false;
|
|
705
|
+
if (newQuery) {
|
|
706
|
+
for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
|
|
707
|
+
if (_this.getModuleName() === 'multiselect' && ((newQuery.queries[queryElements].e && newQuery.queries[queryElements].e.condition == 'or') || (newQuery.queries[queryElements].e && newQuery.queries[queryElements].e.operator == 'equal'))) {
|
|
708
|
+
isReOrder = false;
|
|
709
|
+
}
|
|
700
710
|
}
|
|
701
711
|
}
|
|
702
|
-
_this.hideSpinner();
|
|
703
|
-
_this.isRequested = false;
|
|
704
|
-
_this.isRequesting = false;
|
|
705
|
-
_this.updatePopupState();
|
|
706
|
-
return;
|
|
707
712
|
}
|
|
713
|
+
}
|
|
714
|
+
if (isReOrder) {
|
|
715
|
+
// eslint-disable @typescript-eslint/no-explicit-any
|
|
716
|
+
_this.dataCount = _this.totalItemCount = e.count;
|
|
717
|
+
}
|
|
718
|
+
_this.trigger('actionComplete', e, function (e) {
|
|
708
719
|
if (!e.cancel) {
|
|
709
720
|
_this.isRequesting = false;
|
|
710
721
|
var listItems = e.result;
|
|
@@ -712,12 +723,16 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
712
723
|
ulElement = _this.renderItems(listItems, fields);
|
|
713
724
|
return;
|
|
714
725
|
}
|
|
715
|
-
if (listItems.length === 0) {
|
|
726
|
+
if ((!_this.isVirtualizationEnabled && listItems.length === 0) || (_this.isVirtualizationEnabled && listItems.length === 0 && !isWhereExist_1)) {
|
|
716
727
|
_this.isDataFetched = true;
|
|
717
728
|
}
|
|
729
|
+
if (!isWhereExist_1) {
|
|
730
|
+
_this.remoteDataCount = e.count;
|
|
731
|
+
}
|
|
718
732
|
_this.dataCount = e.count;
|
|
719
733
|
_this.totalItemCount = e.count;
|
|
720
734
|
ulElement = _this.renderItems(listItems, fields);
|
|
735
|
+
_this.appendUncheckList = false;
|
|
721
736
|
_this.onActionComplete(ulElement, listItems, e);
|
|
722
737
|
if (_this.groupTemplate) {
|
|
723
738
|
_this.renderGroupTemplate(ulElement);
|
|
@@ -730,6 +745,17 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
730
745
|
_this.preventPopupOpen = false;
|
|
731
746
|
return;
|
|
732
747
|
}
|
|
748
|
+
if (_this.isVirtualizationEnabled && _this.setCurrentView) {
|
|
749
|
+
_this.notify("setCurrentViewDataAsync", {
|
|
750
|
+
module: "VirtualScroll",
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
if (_this.keyboardEvent != null) {
|
|
754
|
+
_this.handleVirtualKeyboardActions(_this.keyboardEvent, _this.pageCount);
|
|
755
|
+
}
|
|
756
|
+
if (_this.isVirtualizationEnabled) {
|
|
757
|
+
_this.getFilteringSkeletonCount();
|
|
758
|
+
}
|
|
733
759
|
}
|
|
734
760
|
});
|
|
735
761
|
}).catch(function (e) {
|
|
@@ -766,7 +792,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
766
792
|
}
|
|
767
793
|
if (isReOrder) {
|
|
768
794
|
listItems = (newQuery).executeLocal(dataManager);
|
|
769
|
-
_this.isVirtualTrackHeight = true;
|
|
795
|
+
_this.isVirtualTrackHeight = (!(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated) ? true : false;
|
|
770
796
|
}
|
|
771
797
|
}
|
|
772
798
|
}
|
|
@@ -781,7 +807,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
781
807
|
}
|
|
782
808
|
}
|
|
783
809
|
}
|
|
784
|
-
if (isReOrder) {
|
|
810
|
+
if (isReOrder && (!(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated)) {
|
|
785
811
|
// eslint-disable @typescript-eslint/no-explicit-any
|
|
786
812
|
_this.dataCount = _this.totalItemCount = _this.virtualSelectAll ? listItems.length : listItems.count;
|
|
787
813
|
}
|
|
@@ -818,6 +844,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
818
844
|
});
|
|
819
845
|
}
|
|
820
846
|
};
|
|
847
|
+
DropDownBase.prototype.handleVirtualKeyboardActions = function (e, pageCount) {
|
|
848
|
+
// Used this method in component side.
|
|
849
|
+
};
|
|
821
850
|
DropDownBase.prototype.updatePopupState = function () {
|
|
822
851
|
// Used this method in component side.
|
|
823
852
|
};
|
|
@@ -929,6 +958,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
929
958
|
addClass([ulElement.children[i]], HIDE_GROUPLIST);
|
|
930
959
|
}
|
|
931
960
|
}
|
|
961
|
+
if (ulElement.children[0].classList.contains('e-hide-group-header')) {
|
|
962
|
+
setStyleAttribute(ulElement.children[1], { zIndex: 11 });
|
|
963
|
+
}
|
|
932
964
|
}
|
|
933
965
|
}
|
|
934
966
|
if (!isNullOrUndefined(this.list)) {
|
|
@@ -1077,19 +1109,11 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1077
1109
|
for (var i = topIndex; i > -1; i--) {
|
|
1078
1110
|
var index = this.isVirtualizationEnabled ? i + virtualListCount : i;
|
|
1079
1111
|
if (this.isVirtualizationEnabled) {
|
|
1080
|
-
var groupListLength = this.list.querySelectorAll('.e-list-group-item').length;
|
|
1081
|
-
var loadedGroupList = 0;
|
|
1082
1112
|
if (isCount) {
|
|
1083
1113
|
count++;
|
|
1084
1114
|
}
|
|
1085
1115
|
if (this.fixedHeaderElement && this.updateGroupHeader(index, liCollections, target)) {
|
|
1086
|
-
|
|
1087
|
-
if (count >= this.getPageCount()) {
|
|
1088
|
-
break;
|
|
1089
|
-
}
|
|
1090
|
-
if (groupListLength <= loadedGroupList) {
|
|
1091
|
-
break;
|
|
1092
|
-
}
|
|
1116
|
+
break;
|
|
1093
1117
|
}
|
|
1094
1118
|
if (isDownkey) {
|
|
1095
1119
|
if ((!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== 'autocomplete') || (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === 'autocomplete')) {
|
|
@@ -1600,6 +1624,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1600
1624
|
}
|
|
1601
1625
|
if (this.getModuleName() === 'listbox') {
|
|
1602
1626
|
this.updateActionCompleteData(li, item, isListboxEmpty ? null : index);
|
|
1627
|
+
isListboxEmpty = true;
|
|
1603
1628
|
}
|
|
1604
1629
|
else {
|
|
1605
1630
|
this.updateActionCompleteData(li, item, index);
|
|
@@ -1647,7 +1672,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1647
1672
|
}
|
|
1648
1673
|
}
|
|
1649
1674
|
else {
|
|
1650
|
-
if (this.liCollections[index]) {
|
|
1675
|
+
if (this.liCollections[index] && this.liCollections[index].parentNode) {
|
|
1651
1676
|
this.liCollections[index].parentNode.insertBefore(liCollections[i], this.liCollections[index]);
|
|
1652
1677
|
}
|
|
1653
1678
|
else {
|
|
@@ -436,7 +436,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
436
436
|
private updateHomeEndAction;
|
|
437
437
|
protected selectCurrentValueOnTab(e: KeyboardEventArgs): void;
|
|
438
438
|
protected mobileKeyActionHandler(e: KeyboardEventArgs): void;
|
|
439
|
-
|
|
439
|
+
protected handleVirtualKeyboardActions(e: KeyboardEventArgs, pageCount: number): void;
|
|
440
440
|
protected selectCurrentItem(e: KeyboardEventArgs): void;
|
|
441
441
|
protected isSelectFocusItem(element: Element): boolean;
|
|
442
442
|
private pageUpSelection;
|