@syncfusion/ej2-treegrid 33.2.3 → 33.2.8

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.
@@ -2561,13 +2561,10 @@ class DataManipulation {
2561
2561
  // }
2562
2562
  selfReferenceUpdate(selfData) {
2563
2563
  const result = [];
2564
- while (this.hierarchyData.length > 0 && selfData.length > 0) {
2565
- const index = selfData.indexOf(this.hierarchyData[0]);
2566
- if (index === -1) {
2567
- this.hierarchyData.shift();
2568
- }
2569
- else {
2570
- result.push(this.hierarchyData.shift());
2564
+ for (let i = 0; i < this.hierarchyData.length && selfData.length > 0; i++) {
2565
+ const index = selfData.indexOf(this.hierarchyData[parseInt(i.toString(), 10)]);
2566
+ if (index !== -1) {
2567
+ result.push(this.hierarchyData[parseInt(i.toString(), 10)]);
2571
2568
  selfData.splice(index, 1);
2572
2569
  }
2573
2570
  }
@@ -15478,7 +15475,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
15478
15475
  let index = scrolledRows + visibleRows - this.parent.pageSettings.pageSize;
15479
15476
  index = (index > 0) ? index : 0;
15480
15477
  if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 && index !== this[`${selectedRowIndex}`] &&
15481
- ((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop) && !this.parent.allowRowDragAndDrop) {
15478
+ (this.parent.rowHeight && ((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) &&
15479
+ !this.parent.allowRowDragAndDrop) {
15482
15480
  index = this[`${selectedRowIndex}`];
15483
15481
  }
15484
15482
  this.startIndex = index;