@syncfusion/ej2-treegrid 19.4.55 → 19.4.56

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.
@@ -723,7 +723,8 @@ function findChildrenRecords(records) {
723
723
  }
724
724
  if (!isNullOrUndefined(records.childRecords)) {
725
725
  const childRecords = records.childRecords;
726
- for (let i = 0, len = Object.keys(childRecords).length; i < len; i++) {
726
+ const keys = Object.keys(childRecords);
727
+ for (let i = 0, len = keys.length; i < len; i++) {
727
728
  datas.push(childRecords[i]);
728
729
  if (childRecords[i].hasChildRecords || (!isNullOrUndefined(childRecords[i].childRecords) &&
729
730
  childRecords[i].childRecords.length)) {
@@ -1795,7 +1796,8 @@ class DataManipulation {
1795
1796
  this.hierarchyData = data;
1796
1797
  }
1797
1798
  else {
1798
- for (let i = 0; i < Object.keys(data).length; i++) {
1799
+ const keys = Object.keys(data);
1800
+ for (let i = 0; i < keys.length; i++) {
1799
1801
  const tempData = data[i];
1800
1802
  this.hierarchyData.push(extend({}, tempData));
1801
1803
  if (!isNullOrUndefined(tempData[this.parent.idMapping])) {
@@ -2032,7 +2034,8 @@ class DataManipulation {
2032
2034
  }
2033
2035
  createRecords(data, parentRecords) {
2034
2036
  const treeGridData = [];
2035
- for (let i = 0, len = Object.keys(data).length; i < len; i++) {
2037
+ const keys = Object.keys(data);
2038
+ for (let i = 0, len = keys.length; i < len; i++) {
2036
2039
  const currentData = extend({}, data[i]);
2037
2040
  currentData.taskData = data[i];
2038
2041
  let level = 0;
@@ -4224,7 +4227,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4224
4227
  gridColumn[prop] = this.getGridColumns(column[i][prop], false, index);
4225
4228
  treeGridColumn[prop] = column[i][prop];
4226
4229
  }
4227
- else {
4230
+ else if (!(treeColumn) || prop !== 'sortComparer') {
4228
4231
  gridColumn[prop] = treeGridColumn[prop] = column[i][prop];
4229
4232
  }
4230
4233
  }
@@ -7006,7 +7009,8 @@ class RowDD$1 {
7006
7009
  }
7007
7010
  // eslint-disable-next-line max-len
7008
7011
  if (tempDataSource && (!isNullOrUndefined(droppedRecord) && !droppedRecord.parentItem) && !isNullOrUndefined(droppedRecord.taskData)) {
7009
- for (let i = 0; i < Object.keys(tempDataSource).length; i++) {
7012
+ const keys = Object.keys(tempDataSource);
7013
+ for (let i = 0; i < keys.length; i++) {
7010
7014
  if (tempDataSource[i][this.parent.childMapping] === droppedRecord.taskData[this.parent.childMapping]) {
7011
7015
  idx = i;
7012
7016
  }
@@ -10293,7 +10297,7 @@ class Edit$1 {
10293
10297
  const promise = 'promise';
10294
10298
  const prom = args[promise];
10295
10299
  delete args[promise];
10296
- if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex)) {
10300
+ if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex) && this.prevAriaRowIndex !== '-1') {
10297
10301
  args.row.setAttribute('aria-rowindex', this.prevAriaRowIndex);
10298
10302
  this.prevAriaRowIndex = undefined;
10299
10303
  }