@syncfusion/ej2-dropdowns 22.2.12 → 23.1.38
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/.eslintrc.json +260 -0
- package/CHANGELOG.md +4 -209
- package/dist/ej2-dropdowns.min.js +3 -3
- package/dist/ej2-dropdowns.umd.min.js +3 -3
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +1149 -70
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +1203 -66
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +3 -3
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +13 -12
- package/src/auto-complete/auto-complete.js +40 -2
- package/src/combo-box/combo-box.js +9 -3
- package/src/common/index.d.ts +2 -0
- package/src/common/index.js +1 -0
- package/src/common/interface.d.ts +76 -0
- package/src/common/interface.js +1 -0
- package/src/common/virtual-scroll.d.ts +62 -0
- package/src/common/virtual-scroll.js +379 -0
- package/src/drop-down-base/drop-down-base.d.ts +10 -4
- package/src/drop-down-base/drop-down-base.js +72 -8
- package/src/drop-down-list/drop-down-list-model.d.ts +8 -1
- package/src/drop-down-list/drop-down-list.d.ts +56 -1
- package/src/drop-down-list/drop-down-list.js +661 -40
- package/src/drop-down-list/index.d.ts +1 -0
- package/src/drop-down-list/index.js +1 -0
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -1
- package/src/global.js +3 -0
- package/src/mention/mention.js +8 -1
- package/src/multi-select/checkbox-selection.js +1 -1
- package/src/multi-select/multi-select.d.ts +1 -0
- package/src/multi-select/multi-select.js +36 -9
- package/styles/auto-complete/bootstrap-dark.scss +1 -1
- package/styles/auto-complete/bootstrap.scss +1 -1
- package/styles/auto-complete/bootstrap4.scss +1 -1
- package/styles/auto-complete/bootstrap5-dark.scss +1 -1
- package/styles/auto-complete/bootstrap5.scss +1 -1
- package/styles/auto-complete/fabric-dark.scss +1 -1
- package/styles/auto-complete/fabric.scss +1 -1
- package/styles/auto-complete/fluent-dark.scss +1 -1
- package/styles/auto-complete/fluent.scss +1 -1
- package/styles/auto-complete/highcontrast-light.scss +1 -1
- package/styles/auto-complete/highcontrast.scss +1 -1
- package/styles/auto-complete/material-dark.css +0 -1
- package/styles/auto-complete/material-dark.scss +1 -1
- package/styles/auto-complete/material.css +0 -1
- package/styles/auto-complete/material.scss +1 -1
- package/styles/auto-complete/material3-dark.css +0 -1
- package/styles/auto-complete/material3-dark.scss +1 -1
- package/styles/auto-complete/material3.css +0 -1
- package/styles/auto-complete/material3.scss +1 -1
- package/styles/auto-complete/tailwind-dark.css +0 -1
- package/styles/auto-complete/tailwind-dark.scss +1 -1
- package/styles/auto-complete/tailwind.css +0 -1
- package/styles/auto-complete/tailwind.scss +1 -1
- package/styles/bootstrap-dark.css +70 -15
- package/styles/bootstrap.css +70 -15
- package/styles/bootstrap4.css +71 -16
- package/styles/bootstrap5-dark.css +71 -16
- package/styles/bootstrap5.css +71 -16
- package/styles/combo-box/bootstrap-dark.scss +1 -1
- package/styles/combo-box/bootstrap.scss +1 -1
- package/styles/combo-box/bootstrap4.scss +1 -1
- package/styles/combo-box/bootstrap5-dark.scss +1 -1
- package/styles/combo-box/bootstrap5.scss +1 -1
- package/styles/combo-box/fabric-dark.scss +1 -1
- package/styles/combo-box/fabric.scss +1 -1
- package/styles/combo-box/fluent-dark.scss +1 -1
- package/styles/combo-box/fluent.scss +1 -1
- package/styles/combo-box/highcontrast-light.scss +1 -1
- package/styles/combo-box/highcontrast.scss +1 -1
- package/styles/combo-box/material-dark.css +0 -1
- package/styles/combo-box/material-dark.scss +1 -1
- package/styles/combo-box/material.css +0 -1
- package/styles/combo-box/material.scss +1 -1
- package/styles/combo-box/material3-dark.css +0 -1
- package/styles/combo-box/material3-dark.scss +1 -1
- package/styles/combo-box/material3.css +0 -1
- package/styles/combo-box/material3.scss +1 -1
- package/styles/combo-box/tailwind-dark.css +0 -1
- package/styles/combo-box/tailwind-dark.scss +1 -1
- package/styles/combo-box/tailwind.css +0 -1
- package/styles/combo-box/tailwind.scss +1 -1
- package/styles/drop-down-base/bootstrap-dark.scss +1 -1
- package/styles/drop-down-base/bootstrap.scss +1 -1
- package/styles/drop-down-base/bootstrap4.scss +1 -1
- package/styles/drop-down-base/bootstrap5-dark.scss +1 -1
- package/styles/drop-down-base/bootstrap5.scss +1 -1
- package/styles/drop-down-base/fabric-dark.scss +1 -1
- package/styles/drop-down-base/fabric.scss +1 -1
- package/styles/drop-down-base/fluent-dark.scss +1 -1
- package/styles/drop-down-base/fluent.scss +1 -1
- package/styles/drop-down-base/highcontrast-light.scss +1 -1
- package/styles/drop-down-base/highcontrast.scss +1 -1
- package/styles/drop-down-base/material-dark.css +0 -1
- package/styles/drop-down-base/material-dark.scss +1 -1
- package/styles/drop-down-base/material.css +0 -1
- package/styles/drop-down-base/material.scss +1 -1
- package/styles/drop-down-base/material3-dark.css +0 -1
- package/styles/drop-down-base/material3-dark.scss +1 -1
- package/styles/drop-down-base/material3.css +0 -1
- package/styles/drop-down-base/material3.scss +1 -1
- package/styles/drop-down-base/tailwind-dark.css +0 -1
- package/styles/drop-down-base/tailwind-dark.scss +1 -1
- package/styles/drop-down-base/tailwind.css +0 -1
- package/styles/drop-down-base/tailwind.scss +1 -1
- package/styles/drop-down-list/bootstrap-dark.scss +2 -1
- package/styles/drop-down-list/bootstrap.scss +2 -1
- package/styles/drop-down-list/bootstrap4.scss +2 -1
- package/styles/drop-down-list/bootstrap5-dark.scss +2 -1
- package/styles/drop-down-list/bootstrap5.scss +2 -1
- package/styles/drop-down-list/fabric-dark.scss +2 -1
- package/styles/drop-down-list/fabric.scss +2 -1
- package/styles/drop-down-list/fluent-dark.scss +2 -1
- package/styles/drop-down-list/fluent.scss +2 -1
- package/styles/drop-down-list/highcontrast-light.scss +2 -1
- package/styles/drop-down-list/highcontrast.scss +2 -1
- package/styles/drop-down-list/material-dark.css +0 -1
- package/styles/drop-down-list/material-dark.scss +2 -1
- package/styles/drop-down-list/material.css +0 -1
- package/styles/drop-down-list/material.scss +2 -1
- package/styles/drop-down-list/material3-dark.css +0 -1
- package/styles/drop-down-list/material3-dark.scss +2 -1
- package/styles/drop-down-list/material3.css +0 -1
- package/styles/drop-down-list/material3.scss +2 -1
- package/styles/drop-down-list/tailwind-dark.css +0 -1
- package/styles/drop-down-list/tailwind-dark.scss +2 -1
- package/styles/drop-down-list/tailwind.css +0 -1
- package/styles/drop-down-list/tailwind.scss +2 -1
- package/styles/drop-down-tree/bootstrap-dark.scss +1 -1
- package/styles/drop-down-tree/bootstrap.scss +1 -1
- package/styles/drop-down-tree/bootstrap4.scss +1 -1
- package/styles/drop-down-tree/bootstrap5-dark.scss +1 -1
- package/styles/drop-down-tree/bootstrap5.scss +1 -1
- package/styles/drop-down-tree/fabric-dark.scss +1 -1
- package/styles/drop-down-tree/fabric.scss +1 -1
- package/styles/drop-down-tree/fluent-dark.scss +1 -1
- package/styles/drop-down-tree/fluent.scss +1 -1
- package/styles/drop-down-tree/highcontrast-light.scss +1 -1
- package/styles/drop-down-tree/highcontrast.scss +1 -1
- package/styles/drop-down-tree/material-dark.css +0 -1
- package/styles/drop-down-tree/material-dark.scss +1 -1
- package/styles/drop-down-tree/material.css +0 -1
- package/styles/drop-down-tree/material.scss +1 -1
- package/styles/drop-down-tree/material3-dark.css +0 -1
- package/styles/drop-down-tree/material3-dark.scss +1 -1
- package/styles/drop-down-tree/material3.css +0 -1
- package/styles/drop-down-tree/material3.scss +1 -1
- package/styles/drop-down-tree/tailwind-dark.css +0 -1
- package/styles/drop-down-tree/tailwind-dark.scss +1 -1
- package/styles/drop-down-tree/tailwind.css +0 -1
- package/styles/drop-down-tree/tailwind.scss +1 -1
- package/styles/fabric-dark.css +70 -15
- package/styles/fabric.css +70 -15
- package/styles/fluent-dark.css +71 -16
- package/styles/fluent.css +71 -16
- package/styles/highcontrast-light.css +70 -15
- package/styles/highcontrast.css +70 -15
- package/styles/list-box/_bootstrap-dark-definition.scss +6 -2
- package/styles/list-box/_bootstrap-definition.scss +7 -3
- package/styles/list-box/_bootstrap4-definition.scss +10 -6
- package/styles/list-box/_bootstrap5-definition.scss +6 -4
- package/styles/list-box/_fabric-dark-definition.scss +6 -2
- package/styles/list-box/_fabric-definition.scss +6 -2
- package/styles/list-box/_fluent-definition.scss +10 -8
- package/styles/list-box/_highcontrast-definition.scss +6 -2
- package/styles/list-box/_highcontrast-light-definition.scss +6 -2
- package/styles/list-box/_layout.scss +0 -6
- package/styles/list-box/_material-dark-definition.scss +8 -4
- package/styles/list-box/_material-definition.scss +8 -4
- package/styles/list-box/_material3-definition.scss +10 -8
- package/styles/list-box/_tailwind-definition.scss +9 -7
- package/styles/list-box/_theme.scss +72 -7
- package/styles/list-box/bootstrap-dark.css +70 -15
- package/styles/list-box/bootstrap-dark.scss +1 -1
- package/styles/list-box/bootstrap.css +70 -15
- package/styles/list-box/bootstrap.scss +1 -1
- package/styles/list-box/bootstrap4.css +71 -16
- package/styles/list-box/bootstrap4.scss +1 -1
- package/styles/list-box/bootstrap5-dark.css +71 -16
- package/styles/list-box/bootstrap5-dark.scss +1 -1
- package/styles/list-box/bootstrap5.css +71 -16
- package/styles/list-box/bootstrap5.scss +1 -1
- package/styles/list-box/fabric-dark.css +70 -15
- package/styles/list-box/fabric-dark.scss +1 -1
- package/styles/list-box/fabric.css +70 -15
- package/styles/list-box/fabric.scss +1 -1
- package/styles/list-box/fluent-dark.css +71 -16
- package/styles/list-box/fluent-dark.scss +1 -1
- package/styles/list-box/fluent.css +71 -16
- package/styles/list-box/fluent.scss +1 -1
- package/styles/list-box/highcontrast-light.css +70 -15
- package/styles/list-box/highcontrast-light.scss +1 -1
- package/styles/list-box/highcontrast.css +70 -15
- package/styles/list-box/highcontrast.scss +1 -1
- package/styles/list-box/material-dark.css +71 -17
- package/styles/list-box/material-dark.scss +1 -1
- package/styles/list-box/material.css +71 -17
- package/styles/list-box/material.scss +1 -1
- package/styles/list-box/material3-dark.css +71 -17
- package/styles/list-box/material3-dark.scss +1 -1
- package/styles/list-box/material3.css +71 -17
- package/styles/list-box/material3.scss +1 -1
- package/styles/list-box/tailwind-dark.css +71 -17
- package/styles/list-box/tailwind-dark.scss +1 -1
- package/styles/list-box/tailwind.css +71 -17
- package/styles/list-box/tailwind.scss +1 -1
- package/styles/material-dark.css +71 -17
- package/styles/material.css +71 -17
- package/styles/material3-dark.css +71 -17
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +71 -17
- package/styles/material3.scss +1 -1
- package/styles/mention/bootstrap-dark.scss +1 -1
- package/styles/mention/bootstrap.scss +1 -1
- package/styles/mention/bootstrap4.scss +1 -1
- package/styles/mention/bootstrap5-dark.scss +1 -1
- package/styles/mention/bootstrap5.scss +1 -1
- package/styles/mention/fabric-dark.scss +1 -1
- package/styles/mention/fabric.scss +1 -1
- package/styles/mention/fluent-dark.scss +1 -1
- package/styles/mention/fluent.scss +1 -1
- package/styles/mention/highcontrast-light.scss +1 -1
- package/styles/mention/highcontrast.scss +1 -1
- package/styles/mention/material-dark.css +0 -1
- package/styles/mention/material-dark.scss +1 -1
- package/styles/mention/material.css +0 -1
- package/styles/mention/material.scss +1 -1
- package/styles/mention/material3-dark.css +0 -1
- package/styles/mention/material3-dark.scss +1 -1
- package/styles/mention/material3.css +0 -1
- package/styles/mention/material3.scss +1 -1
- package/styles/mention/tailwind-dark.css +0 -1
- package/styles/mention/tailwind-dark.scss +1 -1
- package/styles/mention/tailwind.css +0 -1
- package/styles/mention/tailwind.scss +1 -1
- package/styles/multi-select/bootstrap-dark.scss +1 -1
- package/styles/multi-select/bootstrap.scss +1 -1
- package/styles/multi-select/bootstrap4.scss +1 -1
- package/styles/multi-select/bootstrap5-dark.scss +1 -1
- package/styles/multi-select/bootstrap5.scss +1 -1
- package/styles/multi-select/fabric-dark.scss +1 -1
- package/styles/multi-select/fabric.scss +1 -1
- package/styles/multi-select/fluent-dark.scss +1 -1
- package/styles/multi-select/fluent.scss +1 -1
- package/styles/multi-select/highcontrast-light.scss +1 -1
- package/styles/multi-select/highcontrast.scss +1 -1
- package/styles/multi-select/material-dark.css +0 -1
- package/styles/multi-select/material-dark.scss +1 -1
- package/styles/multi-select/material.css +0 -1
- package/styles/multi-select/material.scss +1 -1
- package/styles/multi-select/material3-dark.css +0 -1
- package/styles/multi-select/material3-dark.scss +1 -1
- package/styles/multi-select/material3.css +0 -1
- package/styles/multi-select/material3.scss +1 -1
- package/styles/multi-select/tailwind-dark.css +0 -1
- package/styles/multi-select/tailwind-dark.scss +1 -1
- package/styles/multi-select/tailwind.css +0 -1
- package/styles/multi-select/tailwind.scss +1 -1
- package/styles/tailwind-dark.css +71 -24
- package/styles/tailwind.css +71 -24
- package/tslint.json +111 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 -
|
|
3
|
+
* version : 23.1.38
|
|
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
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@23.1.36",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-+XC5hkXgdEtcl34xCI+wmNoO4GwZtSdi98IOrZ8iOiSTs6dIRAoJj4Znj87n4whoW09U04LF1HgoyKxxT5txNQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,21 +34,22 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-23.1.36.tgz",
|
|
38
|
+
"_shasum": "507377d454396bf60c334eaecdb01fde5a986bbb",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
|
-
"_where": "/jenkins/workspace/elease-
|
|
40
|
+
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
42
42
|
"name": "Syncfusion Inc."
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~
|
|
47
|
-
"@syncfusion/ej2-data": "~
|
|
48
|
-
"@syncfusion/ej2-inputs": "~
|
|
49
|
-
"@syncfusion/ej2-lists": "~
|
|
50
|
-
"@syncfusion/ej2-navigations": "~
|
|
51
|
-
"@syncfusion/ej2-
|
|
46
|
+
"@syncfusion/ej2-base": "~23.1.38",
|
|
47
|
+
"@syncfusion/ej2-data": "~23.1.36",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~23.1.38",
|
|
49
|
+
"@syncfusion/ej2-lists": "~23.1.36",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~23.1.36",
|
|
51
|
+
"@syncfusion/ej2-notifications": "~23.1.36",
|
|
52
|
+
"@syncfusion/ej2-popups": "~23.1.38"
|
|
52
53
|
},
|
|
53
54
|
"deprecated": false,
|
|
54
55
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"module": "./index.js",
|
|
74
75
|
"name": "@syncfusion/ej2-dropdowns",
|
|
75
76
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "
|
|
77
|
+
"version": "23.1.38",
|
|
77
78
|
"sideEffects": false,
|
|
78
79
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
79
80
|
}
|
|
@@ -89,7 +89,7 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
89
89
|
filterQuery.where(mapping, filterType, queryString, this.ignoreCase, this.ignoreAccent);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
if (!isNullOrUndefined(this.suggestionCount)) {
|
|
92
|
+
if (!isNullOrUndefined(this.suggestionCount) && !this.enableVirtualization) {
|
|
93
93
|
// Since defualt value of suggestioncount is 20, checked the condition
|
|
94
94
|
if (this.suggestionCount !== 20) {
|
|
95
95
|
for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
|
|
@@ -100,12 +100,19 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
100
100
|
}
|
|
101
101
|
filterQuery.take(this.suggestionCount);
|
|
102
102
|
}
|
|
103
|
+
if (this.enableVirtualization) {
|
|
104
|
+
var takeValue = this.getTakeValue();
|
|
105
|
+
filterQuery.skip(this.virtualItemStartIndex);
|
|
106
|
+
filterQuery.take(takeValue);
|
|
107
|
+
filterQuery.requiresCount();
|
|
108
|
+
}
|
|
103
109
|
return filterQuery;
|
|
104
110
|
};
|
|
105
111
|
AutoComplete.prototype.searchLists = function (e) {
|
|
106
112
|
var _this_1 = this;
|
|
107
113
|
this.isTyped = true;
|
|
108
114
|
this.isDataFetched = this.isSelectCustom = false;
|
|
115
|
+
this.checkAndResetCache();
|
|
109
116
|
if (isNullOrUndefined(this.list)) {
|
|
110
117
|
_super.prototype.renderList.call(this, e, true);
|
|
111
118
|
}
|
|
@@ -152,8 +159,32 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
152
159
|
};
|
|
153
160
|
AutoComplete.prototype.filterAction = function (dataSource, query, fields, e) {
|
|
154
161
|
this.beforePopupOpen = true;
|
|
162
|
+
var isNoDataElement = this.list.classList.contains('e-nodata');
|
|
155
163
|
if (this.queryString !== '' && (this.queryString.length >= this.minLength)) {
|
|
164
|
+
if (this.enableVirtualization && this.isFiltering() && this.isTyped) {
|
|
165
|
+
this.isPreventScrollAction = true;
|
|
166
|
+
this.list.scrollTop = 0;
|
|
167
|
+
this.previousStartIndex = 0;
|
|
168
|
+
this.virtualListInfo = null;
|
|
169
|
+
}
|
|
156
170
|
this.resetList(dataSource, fields, query, e);
|
|
171
|
+
if (this.enableVirtualization && isNoDataElement && !this.list.classList.contains('e-nodata')) {
|
|
172
|
+
if (!this.list.querySelector('.e-virtual-ddl-content')) {
|
|
173
|
+
this.list.appendChild(this.createElement('div', {
|
|
174
|
+
className: 'e-virtual-ddl-content',
|
|
175
|
+
styles: this.getTransformValues()
|
|
176
|
+
})).appendChild(this.list.querySelector('.e-list-parent'));
|
|
177
|
+
}
|
|
178
|
+
if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
179
|
+
var virualElement = this.createElement('div', {
|
|
180
|
+
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
181
|
+
});
|
|
182
|
+
document.getElementsByClassName('e-popup')[0].querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (this.enableVirtualization) {
|
|
186
|
+
this.getFilteringSkeletonCount();
|
|
187
|
+
}
|
|
157
188
|
}
|
|
158
189
|
else {
|
|
159
190
|
this.hidePopup(e);
|
|
@@ -164,6 +195,7 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
164
195
|
AutoComplete.prototype.clearAll = function (e, property) {
|
|
165
196
|
if (isNullOrUndefined(property) || (!isNullOrUndefined(property) && isNullOrUndefined(property.dataSource))) {
|
|
166
197
|
_super.prototype.clearAll.call(this, e);
|
|
198
|
+
this.checkAndResetCache();
|
|
167
199
|
}
|
|
168
200
|
if (this.beforePopupOpen) {
|
|
169
201
|
this.hidePopup();
|
|
@@ -246,7 +278,9 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
246
278
|
return true;
|
|
247
279
|
};
|
|
248
280
|
AutoComplete.prototype.renderPopup = function (e) {
|
|
249
|
-
this.
|
|
281
|
+
if (!this.enableVirtualization) {
|
|
282
|
+
this.list.scrollTop = 0;
|
|
283
|
+
}
|
|
250
284
|
_super.prototype.renderPopup.call(this, e);
|
|
251
285
|
};
|
|
252
286
|
AutoComplete.prototype.isEditTextBox = function () {
|
|
@@ -314,6 +348,10 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
314
348
|
AutoComplete.prototype.hidePopup = function (e) {
|
|
315
349
|
_super.prototype.hidePopup.call(this, e);
|
|
316
350
|
this.activeIndex = null;
|
|
351
|
+
this.virtualListInfo = this.viewPortInfo;
|
|
352
|
+
this.previousStartIndex = this.viewPortInfo.startIndex;
|
|
353
|
+
this.startIndex = this.viewPortInfo.startIndex;
|
|
354
|
+
this.previousEndIndex = this.viewPortInfo.endIndex;
|
|
317
355
|
};
|
|
318
356
|
/**
|
|
319
357
|
* Dynamically change the value of properties.
|
|
@@ -246,14 +246,18 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
246
246
|
if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {
|
|
247
247
|
this.removeFocus();
|
|
248
248
|
var fixedHead = this.fields.groupBy ? this.liCollections[0].offsetHeight : 0;
|
|
249
|
-
this.
|
|
249
|
+
if (!this.enableVirtualization) {
|
|
250
|
+
this.list.scrollTop = count * height + fixedHead;
|
|
251
|
+
}
|
|
250
252
|
addClass([activeElement], dropDownListClasses.focus);
|
|
251
253
|
}
|
|
252
254
|
}
|
|
253
255
|
else {
|
|
254
256
|
if (this.isSelectCustom && this.inputElement.value.trim() !== '') {
|
|
255
257
|
this.removeFocus();
|
|
256
|
-
this.
|
|
258
|
+
if (!this.enableVirtualization) {
|
|
259
|
+
this.list.scrollTop = 0;
|
|
260
|
+
}
|
|
257
261
|
}
|
|
258
262
|
}
|
|
259
263
|
return activeElement;
|
|
@@ -389,7 +393,9 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
389
393
|
else if (this.inputElement.value === '') {
|
|
390
394
|
this.activeIndex = null;
|
|
391
395
|
if (!isNullOrUndefined(this.list)) {
|
|
392
|
-
this.
|
|
396
|
+
if (!this.enableVirtualization) {
|
|
397
|
+
this.list.scrollTop = 0;
|
|
398
|
+
}
|
|
393
399
|
var focusItem = this.list.querySelector('.' + dropDownListClasses.li);
|
|
394
400
|
this.setHoverList(focusItem);
|
|
395
401
|
}
|
package/src/common/index.d.ts
CHANGED
package/src/common/index.js
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Component, KeyboardEventArgs } from '@syncfusion/ej2-base';
|
|
2
|
+
import { Popup } from '@syncfusion/ej2-popups';
|
|
3
|
+
import { VirtualInfo } from '../common/virtual-scroll';
|
|
4
|
+
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
5
|
+
import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';
|
|
6
|
+
import { GeneratedData } from '../drop-down-list/drop-down-list';
|
|
7
|
+
/**
|
|
8
|
+
* Specifies virtual scroll interfaces.
|
|
9
|
+
*
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface IDropdownlist extends Component<HTMLElement> {
|
|
13
|
+
popupContentElement: HTMLElement;
|
|
14
|
+
isPreventScrollAction: boolean;
|
|
15
|
+
listHeight: string;
|
|
16
|
+
previousStartIndex: number;
|
|
17
|
+
previousEndIndex: number;
|
|
18
|
+
previousInfo: VirtualInfo;
|
|
19
|
+
startIndex: number;
|
|
20
|
+
currentPageNumber: number;
|
|
21
|
+
isMouseScrollAction: boolean;
|
|
22
|
+
isPreventKeyAction: boolean;
|
|
23
|
+
pageCount: number;
|
|
24
|
+
isKeyBoardAction: boolean;
|
|
25
|
+
viewPortInfo: VirtualInfo;
|
|
26
|
+
isUpwardScrolling: boolean;
|
|
27
|
+
queryString: string;
|
|
28
|
+
containerElementRect: ClientRect;
|
|
29
|
+
isScrollActionTriggered: boolean;
|
|
30
|
+
virtualListInfo: VirtualInfo;
|
|
31
|
+
selectedValueInfo: VirtualInfo;
|
|
32
|
+
value: number | string | boolean;
|
|
33
|
+
totalItemCount: number;
|
|
34
|
+
virtualItemCount: number;
|
|
35
|
+
virtualItemEndIndex: number;
|
|
36
|
+
virtualItemStartIndex: number;
|
|
37
|
+
popupObj: Popup;
|
|
38
|
+
listItemHeight: number;
|
|
39
|
+
scrollPreStartIndex: number;
|
|
40
|
+
list: HTMLElement;
|
|
41
|
+
liCollections: HTMLElement[];
|
|
42
|
+
typedString: string;
|
|
43
|
+
isVirtualScrolling: boolean;
|
|
44
|
+
isCustomFilter: boolean;
|
|
45
|
+
allowFiltering: boolean;
|
|
46
|
+
isPopupOpen: boolean;
|
|
47
|
+
isTyped: boolean;
|
|
48
|
+
itemCount: number;
|
|
49
|
+
fields: FieldSettingsModel;
|
|
50
|
+
generatedDataObject: GeneratedData;
|
|
51
|
+
keyboardEvent: KeyboardEventArgs;
|
|
52
|
+
dataCount: number;
|
|
53
|
+
filterInput: HTMLInputElement;
|
|
54
|
+
dataSource: {
|
|
55
|
+
[key: string]: Object;
|
|
56
|
+
}[] | DataManager | string[] | number[] | boolean[];
|
|
57
|
+
listData: {
|
|
58
|
+
[key: string]: Object;
|
|
59
|
+
}[] | string[] | boolean[] | number[];
|
|
60
|
+
getSkeletonCount(retainSkeleton?: boolean): void;
|
|
61
|
+
getItems(): HTMLElement[];
|
|
62
|
+
getQuery(query: Query): Query;
|
|
63
|
+
getTransformValues(): string;
|
|
64
|
+
UpdateSkeleton(): void;
|
|
65
|
+
updateSelectionList(): void;
|
|
66
|
+
GetVirtualTrackHeight(): string;
|
|
67
|
+
getPageCount(returnExactCount?: boolean): number;
|
|
68
|
+
handleVirtualKeyboardActions(e: KeyboardEventArgs, pageCount: number): void;
|
|
69
|
+
renderItems(listData: {
|
|
70
|
+
[key: string]: Object;
|
|
71
|
+
}[], fields: FieldSettingsModel): HTMLElement;
|
|
72
|
+
resetList(dataSource?: {
|
|
73
|
+
[key: string]: Object;
|
|
74
|
+
}[] | DataManager | string[] | number[] | boolean[], fields?: FieldSettingsModel, query?: Query, e?: MouseEvent | KeyboardEventArgs | TouchEvent): void;
|
|
75
|
+
findListElement(list: HTMLElement, findNode: string, attribute: string, value: string | boolean | number): HTMLElement;
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { IDropdownlist } from './interface';
|
|
2
|
+
export declare type ScrollDirection = 'up' | 'down';
|
|
3
|
+
declare type ScrollArg = {
|
|
4
|
+
direction: string;
|
|
5
|
+
sentinel: SentinelType;
|
|
6
|
+
offset: Offsets;
|
|
7
|
+
focusElement: HTMLElement;
|
|
8
|
+
};
|
|
9
|
+
export declare type SentinelType = {
|
|
10
|
+
check?: (rect: ClientRect, info: SentinelType) => boolean;
|
|
11
|
+
top?: number;
|
|
12
|
+
entered?: boolean;
|
|
13
|
+
axis?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare type SentinelInfo = {
|
|
16
|
+
up?: SentinelType;
|
|
17
|
+
down?: SentinelType;
|
|
18
|
+
right?: SentinelType;
|
|
19
|
+
left?: SentinelType;
|
|
20
|
+
};
|
|
21
|
+
export declare type Offsets = {
|
|
22
|
+
top?: number;
|
|
23
|
+
left?: number;
|
|
24
|
+
};
|
|
25
|
+
export interface VirtualInfo {
|
|
26
|
+
currentPageNumber?: number;
|
|
27
|
+
direction?: string;
|
|
28
|
+
sentinelInfo?: SentinelType;
|
|
29
|
+
offsets?: Offsets;
|
|
30
|
+
startIndex?: number;
|
|
31
|
+
endIndex?: number;
|
|
32
|
+
}
|
|
33
|
+
export declare class VirtualScroll {
|
|
34
|
+
private parent;
|
|
35
|
+
private containerElementRect;
|
|
36
|
+
private element;
|
|
37
|
+
private options;
|
|
38
|
+
private touchModule;
|
|
39
|
+
private component;
|
|
40
|
+
constructor(parent: IDropdownlist);
|
|
41
|
+
addEventListener(): void;
|
|
42
|
+
removeEventListener(): void;
|
|
43
|
+
private bindScrollEvent;
|
|
44
|
+
private observe;
|
|
45
|
+
getModuleName(): string;
|
|
46
|
+
private popupScrollHandler;
|
|
47
|
+
private getPageQuery;
|
|
48
|
+
private setGeneratedData;
|
|
49
|
+
private generateAndExecuteQueryAsync;
|
|
50
|
+
setCurrentViewDataAsync(): void;
|
|
51
|
+
private generateQueryAndSetQueryIndexAsync;
|
|
52
|
+
private dataProcessAsync;
|
|
53
|
+
private virtualScrollRefreshAsync;
|
|
54
|
+
scrollListener(scrollArgs: ScrollArg): void;
|
|
55
|
+
private getPageCount;
|
|
56
|
+
private getRowHeight;
|
|
57
|
+
private getInfoFromView;
|
|
58
|
+
private sentinelInfo;
|
|
59
|
+
private virtualScrollHandler;
|
|
60
|
+
destroy(): void;
|
|
61
|
+
}
|
|
62
|
+
export {};
|