@syncfusion/ej2-lists 26.2.10 → 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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 26.2.10
3
+ * version : 26.2.11
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-lists@*",
3
- "_id": "@syncfusion/ej2-lists@26.2.5",
3
+ "_id": "@syncfusion/ej2-lists@26.2.10",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-QvWDq/thNn4IROcHeegwi5xvaz1BBhV5BVpQJ9bvvydDFWTLvG3eH+/hKVW0/+z630aVQCIs2oeRdW/wOYGgcg==",
5
+ "_integrity": "sha512-e9VZtxBNBMjvKnkR/ZCDEZoFEHNz3quZBYeTFE1anFmxMvE0/dcchRahFcctCM2l+/9XW50iTGHHdz7E9ZtM4g==",
6
6
  "_location": "/@syncfusion/ej2-lists",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -35,8 +35,8 @@
35
35
  "/@syncfusion/ej2-schedule",
36
36
  "/@syncfusion/ej2-vue-lists"
37
37
  ],
38
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-26.2.5.tgz",
39
- "_shasum": "c39bf560c34260f7d83df0b51a5707187e41779e",
38
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-26.2.10.tgz",
39
+ "_shasum": "344ce6844fb6b54c1ed15b98b5d294e2cdb4c4db",
40
40
  "_spec": "@syncfusion/ej2-lists@*",
41
41
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
42
42
  "author": {
@@ -47,7 +47,7 @@
47
47
  "@syncfusion/ej2-base": "~26.2.10",
48
48
  "@syncfusion/ej2-buttons": "~26.2.10",
49
49
  "@syncfusion/ej2-data": "~26.2.10",
50
- "@syncfusion/ej2-popups": "~26.2.10"
50
+ "@syncfusion/ej2-popups": "~26.2.11"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views.",
@@ -87,7 +87,7 @@
87
87
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/lists"
88
88
  },
89
89
  "typings": "index.d.ts",
90
- "version": "26.2.10",
90
+ "version": "26.2.11",
91
91
  "sideEffects": false,
92
92
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
93
93
  }
@@ -665,7 +665,6 @@ export interface ListSelectedItem {
665
665
  * ```props
666
666
  * Top:- The scrollbar is moved upwards.
667
667
  * Bottom:- The scrollbar is moved downwards.
668
-
669
668
  * ```
670
669
  */
671
670
  export declare type direction = 'Top' | 'Bottom';
@@ -228,6 +228,7 @@ var ListView = /** @class */ (function (_super) {
228
228
  }
229
229
  break;
230
230
  case 'dataSource':
231
+ this.previousScrollTop = this.element.scrollTop;
231
232
  if (this.enableVirtualization) {
232
233
  this.virtualizationModule.reRenderUiVirtualization();
233
234
  }
@@ -963,8 +964,9 @@ var ListView = /** @class */ (function (_super) {
963
964
  if (!isNullOrUndefined(this.scroll)) {
964
965
  EventHandler.remove(this.element, 'scroll', this.onListScroll);
965
966
  }
966
- if (this.touchModule)
967
+ if (this.touchModule) {
967
968
  this.touchModule.destroy();
969
+ }
968
970
  this.touchModule = null;
969
971
  };
970
972
  ListView.prototype.removeFocus = function () {
@@ -32,8 +32,10 @@ var Virtualization = /** @class */ (function () {
32
32
  */
33
33
  Virtualization.prototype.uiVirtualization = function () {
34
34
  this.wireScrollEvent(false);
35
+ var isRendered = this.listViewInstance.isRendered;
36
+ var firstIndex = isRendered && !isNullOrUndefined(this.uiFirstIndex) ? this.uiFirstIndex : 0;
35
37
  var curViewDS = this.listViewInstance.curViewDS;
36
- var firstDs = curViewDS.slice(0, 1);
38
+ var firstDs = curViewDS.slice(firstIndex, firstIndex + 1);
37
39
  this.listViewInstance.ulElement = this.listViewInstance.curUL = ListBase.createList(this.listViewInstance.createElement, firstDs, this.listViewInstance.listBaseOption, null, this.listViewInstance);
38
40
  this.listViewInstance.contentContainer = this.listViewInstance.createElement('div', { className: classNames.container });
39
41
  this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer);
@@ -41,9 +43,10 @@ var Virtualization = /** @class */ (function () {
41
43
  this.listItemHeight = this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height;
42
44
  this.expectedDomItemCount = this.ValidateItemCount(10000);
43
45
  this.domItemCount = this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length);
44
- this.uiFirstIndex = 0;
45
- this.uiLastIndex = this.domItemCount - 1;
46
- var otherDs = curViewDS.slice(1, this.domItemCount);
46
+ var lastIndex = isRendered && !isNullOrUndefined(this.uiLastIndex) ? this.uiLastIndex : this.domItemCount - 1;
47
+ this.uiFirstIndex = firstIndex;
48
+ this.uiLastIndex = lastIndex;
49
+ var otherDs = curViewDS.slice(firstIndex + 1, lastIndex + 1);
47
50
  var listItems = ListBase.createListItemFromJson(this.listViewInstance.createElement, otherDs, this.listViewInstance.listBaseOption, null, null, this.listViewInstance);
48
51
  append(listItems, this.listViewInstance.ulElement);
49
52
  this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
@@ -52,11 +55,14 @@ var Virtualization = /** @class */ (function () {
52
55
  this.bottomElement = this.listViewInstance.createElement('div');
53
56
  this.listViewInstance.ulElement.insertBefore(this.bottomElement, null);
54
57
  this.totalHeight = (Object.keys(curViewDS).length * this.listItemHeight) - (this.domItemCount * this.listItemHeight);
55
- this.topElement.style.height = 0 + 'px';
56
- this.bottomElement.style.height = this.totalHeight + 'px';
57
- this.topElementHeight = 0;
58
- this.bottomElementHeight = this.totalHeight;
59
- this.listDiff = 0;
58
+ this.topElement.style.height = isRendered ? this.topElementHeight + 'px' : '0px';
59
+ this.bottomElement.style.height = isRendered ? (this.totalHeight - this.topElementHeight) + 'px' : this.totalHeight + 'px';
60
+ this.topElementHeight = isRendered ? this.topElementHeight : 0;
61
+ this.bottomElementHeight = isRendered ? (this.totalHeight - this.topElementHeight) : this.totalHeight;
62
+ this.listDiff = isRendered ? this.listDiff : 0;
63
+ if (isRendered) {
64
+ this.listViewInstance.element.scrollTop = this.listViewInstance.previousScrollTop;
65
+ }
60
66
  this.uiIndicesInitialization();
61
67
  };
62
68
  Virtualization.prototype.wireScrollEvent = function (destroy) {
@@ -1 +0,0 @@
1
- hotfix/26.1.35_Vol2