@syncfusion/ej2-treegrid 26.1.39 → 26.1.41

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.
@@ -3211,7 +3211,7 @@ function removeChildRecords(childRecords, modifiedData, action, key, control, is
3211
3211
  editedData.taskData[keys[parseInt(i.toString(), 10)]] =
3212
3212
  childRecords[parseInt(j.toString(), 10)][keys[parseInt(i.toString(), 10)]] =
3213
3213
  modifiedData[keys[parseInt(i.toString(), 10)]];
3214
- if (control.grid.editSettings.mode === 'Normal' && control.editSettings.mode === 'Cell') {
3214
+ if (control.grid.editSettings.mode === 'Normal' && control.editSettings.mode === 'Cell' && !isNullOrUndefined(control.grid.editModule)) {
3215
3215
  const editModule = 'editModule';
3216
3216
  control.grid.editModule[`${editModule}`].editRowIndex = modifiedData.index;
3217
3217
  control.grid.editModule[`${editModule}`].updateCurrentViewData(modifiedData);
@@ -5143,7 +5143,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5143
5143
  onPropertyChanged(newProp) {
5144
5144
  const properties = Object.keys(newProp);
5145
5145
  let requireRefresh = false;
5146
- if (properties.indexOf('columns') > -1) {
5146
+ if (properties.indexOf('columns') > -1 && !isNullOrUndefined(newProp.columns)) {
5147
5147
  this.grid.columns = this.getGridColumns(newProp.columns);
5148
5148
  this.grid['updateColumnObject']();
5149
5149
  requireRefresh = true;
@@ -6261,6 +6261,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6261
6261
  * @returns {void}
6262
6262
  */
6263
6263
  expandRow(row, record, key, level) {
6264
+ this.isCollapseAll = false;
6264
6265
  if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key) && isNullOrUndefined(level)) {
6265
6266
  const error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
6266
6267
  this.trigger(actionFailure, { error: error });
@@ -6381,6 +6382,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6381
6382
  * @returns {void}
6382
6383
  */
6383
6384
  collapseRow(row, record, key) {
6385
+ this.isExpandAll = false;
6384
6386
  if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key)) {
6385
6387
  const error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
6386
6388
  this.trigger(actionFailure, { error: error });
@@ -6649,6 +6651,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6649
6651
  return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6650
6652
  });
6651
6653
  }
6654
+ if (!rows.length && this.getRows().length) {
6655
+ rows.push(this.getRows()[0]);
6656
+ }
6652
6657
  this.isExpandAll = true;
6653
6658
  this.isCollapseAll = true;
6654
6659
  if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
@@ -9005,7 +9010,7 @@ class RowDD {
9005
9010
  for (let i = 0; i < dragLength; i++) {
9006
9011
  draggedRecord = dragRecords[parseInt(i.toString(), 10)];
9007
9012
  this.draggedRecord = draggedRecord;
9008
- if (this.dropPosition !== 'Invalid') {
9013
+ if (this.dropPosition !== 'Invalid' && !isNullOrUndefined(this.droppedRecord)) {
9009
9014
  if (!tObj.rowDropSettings.targetID || isByMethod) {
9010
9015
  this.deleteDragRow();
9011
9016
  }
@@ -13641,6 +13646,11 @@ class VirtualScroll {
13641
13646
  }
13642
13647
  }
13643
13648
  //}
13649
+ if (this.prevrequestType === 'collapseAll' && pageingDetails.actionArgs.requestType === 'virtualscroll') {
13650
+ startIndex = 0;
13651
+ endIndex = this.parent.grid.pageSettings.pageSize - 1;
13652
+ this.parent.grid.notify(virtualActionArgs, { setTop: true });
13653
+ }
13644
13654
  if ((this.parent.enableCollapseAll || this.parent.expandStateMapping) && !isNullOrUndefined(this.expandCollapseRec)) {
13645
13655
  if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
13646
13656
  startIndex = 0;
@@ -13659,6 +13669,7 @@ class VirtualScroll {
13659
13669
  }
13660
13670
  this.prevstartIndex = startIndex;
13661
13671
  this.prevendIndex = endIndex;
13672
+ this.prevrequestType = pageingDetails.actionArgs.requestType;
13662
13673
  }
13663
13674
  this.parent.notify('updateAction', pageingDetails);
13664
13675
  }