@syncfusion/ej2-lists 26.2.5 → 26.2.11
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-lists.min.js +2 -2
- package/dist/ej2-lists.umd.min.js +2 -2
- package/dist/ej2-lists.umd.min.js.map +1 -1
- package/dist/es6/ej2-lists.es2015.js +18 -10
- package/dist/es6/ej2-lists.es2015.js.map +1 -1
- package/dist/es6/ej2-lists.es5.js +18 -10
- package/dist/es6/ej2-lists.es5.js.map +1 -1
- package/dist/global/ej2-lists.min.js +2 -2
- package/dist/global/ej2-lists.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/list-view/list-view.d.ts +0 -1
- package/src/list-view/list-view.js +3 -1
- package/src/list-view/virtualization.js +15 -9
- package/styles/fluent2.css +3 -1031
- package/styles/list-view/fluent2.css +3 -1031
- package/styles/list-view/material3-dark.css +1 -54
- package/styles/list-view/material3.css +2 -109
- package/styles/material3-dark.css +1 -54
- package/styles/material3.css +2 -109
- package/styles/sortable/fluent2.css +3 -1031
- package/styles/sortable/material3-dark.css +1 -54
- package/styles/sortable/material3.css +2 -109
|
@@ -1328,6 +1328,7 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
break;
|
|
1330
1330
|
case 'dataSource':
|
|
1331
|
+
this.previousScrollTop = this.element.scrollTop;
|
|
1331
1332
|
if (this.enableVirtualization) {
|
|
1332
1333
|
this.virtualizationModule.reRenderUiVirtualization();
|
|
1333
1334
|
}
|
|
@@ -2061,8 +2062,9 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
2061
2062
|
if (!isNullOrUndefined(this.scroll)) {
|
|
2062
2063
|
EventHandler.remove(this.element, 'scroll', this.onListScroll);
|
|
2063
2064
|
}
|
|
2064
|
-
if (this.touchModule)
|
|
2065
|
+
if (this.touchModule) {
|
|
2065
2066
|
this.touchModule.destroy();
|
|
2067
|
+
}
|
|
2066
2068
|
this.touchModule = null;
|
|
2067
2069
|
};
|
|
2068
2070
|
ListView.prototype.removeFocus = function () {
|
|
@@ -3221,8 +3223,10 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
3221
3223
|
*/
|
|
3222
3224
|
Virtualization.prototype.uiVirtualization = function () {
|
|
3223
3225
|
this.wireScrollEvent(false);
|
|
3226
|
+
var isRendered = this.listViewInstance.isRendered;
|
|
3227
|
+
var firstIndex = isRendered && !isNullOrUndefined(this.uiFirstIndex) ? this.uiFirstIndex : 0;
|
|
3224
3228
|
var curViewDS = this.listViewInstance.curViewDS;
|
|
3225
|
-
var firstDs = curViewDS.slice(
|
|
3229
|
+
var firstDs = curViewDS.slice(firstIndex, firstIndex + 1);
|
|
3226
3230
|
this.listViewInstance.ulElement = this.listViewInstance.curUL = ListBase.createList(this.listViewInstance.createElement, firstDs, this.listViewInstance.listBaseOption, null, this.listViewInstance);
|
|
3227
3231
|
this.listViewInstance.contentContainer = this.listViewInstance.createElement('div', { className: classNames.container });
|
|
3228
3232
|
this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer);
|
|
@@ -3230,9 +3234,10 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
3230
3234
|
this.listItemHeight = this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height;
|
|
3231
3235
|
this.expectedDomItemCount = this.ValidateItemCount(10000);
|
|
3232
3236
|
this.domItemCount = this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length);
|
|
3233
|
-
this.
|
|
3234
|
-
this.
|
|
3235
|
-
|
|
3237
|
+
var lastIndex = isRendered && !isNullOrUndefined(this.uiLastIndex) ? this.uiLastIndex : this.domItemCount - 1;
|
|
3238
|
+
this.uiFirstIndex = firstIndex;
|
|
3239
|
+
this.uiLastIndex = lastIndex;
|
|
3240
|
+
var otherDs = curViewDS.slice(firstIndex + 1, lastIndex + 1);
|
|
3236
3241
|
var listItems = ListBase.createListItemFromJson(this.listViewInstance.createElement, otherDs, this.listViewInstance.listBaseOption, null, null, this.listViewInstance);
|
|
3237
3242
|
append(listItems, this.listViewInstance.ulElement);
|
|
3238
3243
|
this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
|
|
@@ -3241,11 +3246,14 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
3241
3246
|
this.bottomElement = this.listViewInstance.createElement('div');
|
|
3242
3247
|
this.listViewInstance.ulElement.insertBefore(this.bottomElement, null);
|
|
3243
3248
|
this.totalHeight = (Object.keys(curViewDS).length * this.listItemHeight) - (this.domItemCount * this.listItemHeight);
|
|
3244
|
-
this.topElement.style.height =
|
|
3245
|
-
this.bottomElement.style.height = this.totalHeight + 'px';
|
|
3246
|
-
this.topElementHeight = 0;
|
|
3247
|
-
this.bottomElementHeight = this.totalHeight;
|
|
3248
|
-
this.listDiff = 0;
|
|
3249
|
+
this.topElement.style.height = isRendered ? this.topElementHeight + 'px' : '0px';
|
|
3250
|
+
this.bottomElement.style.height = isRendered ? (this.totalHeight - this.topElementHeight) + 'px' : this.totalHeight + 'px';
|
|
3251
|
+
this.topElementHeight = isRendered ? this.topElementHeight : 0;
|
|
3252
|
+
this.bottomElementHeight = isRendered ? (this.totalHeight - this.topElementHeight) : this.totalHeight;
|
|
3253
|
+
this.listDiff = isRendered ? this.listDiff : 0;
|
|
3254
|
+
if (isRendered) {
|
|
3255
|
+
this.listViewInstance.element.scrollTop = this.listViewInstance.previousScrollTop;
|
|
3256
|
+
}
|
|
3249
3257
|
this.uiIndicesInitialization();
|
|
3250
3258
|
};
|
|
3251
3259
|
Virtualization.prototype.wireScrollEvent = function (destroy) {
|