@syncfusion/ej2-treegrid 26.1.39 → 26.1.40

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.
@@ -5447,7 +5447,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5447
5447
  TreeGrid.prototype.onPropertyChanged = function (newProp) {
5448
5448
  var properties = Object.keys(newProp);
5449
5449
  var requireRefresh = false;
5450
- if (properties.indexOf('columns') > -1) {
5450
+ if (properties.indexOf('columns') > -1 && !isNullOrUndefined(newProp.columns)) {
5451
5451
  this.grid.columns = this.getGridColumns(newProp.columns);
5452
5452
  this.grid['updateColumnObject']();
5453
5453
  requireRefresh = true;
@@ -6570,6 +6570,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6570
6570
  */
6571
6571
  TreeGrid.prototype.expandRow = function (row, record, key, level) {
6572
6572
  var _this = this;
6573
+ this.isCollapseAll = false;
6573
6574
  if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key) && isNullOrUndefined(level)) {
6574
6575
  var error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
6575
6576
  this.trigger(actionFailure, { error: error });
@@ -6691,6 +6692,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6691
6692
  */
6692
6693
  TreeGrid.prototype.collapseRow = function (row, record, key) {
6693
6694
  var _this = this;
6695
+ this.isExpandAll = false;
6694
6696
  if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key)) {
6695
6697
  var error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
6696
6698
  this.trigger(actionFailure, { error: error });
@@ -6965,6 +6967,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6965
6967
  return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6966
6968
  });
6967
6969
  }
6970
+ if (!rows.length && this.getRows().length) {
6971
+ rows.push(this.getRows()[0]);
6972
+ }
6968
6973
  this.isExpandAll = true;
6969
6974
  this.isCollapseAll = true;
6970
6975
  if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
@@ -14090,6 +14095,11 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14090
14095
  }
14091
14096
  }
14092
14097
  //}
14098
+ if (this.prevrequestType === 'collapseAll' && pageingDetails.actionArgs.requestType === 'virtualscroll') {
14099
+ startIndex = 0;
14100
+ endIndex = this.parent.grid.pageSettings.pageSize - 1;
14101
+ this.parent.grid.notify(virtualActionArgs, { setTop: true });
14102
+ }
14093
14103
  if ((this.parent.enableCollapseAll || this.parent.expandStateMapping) && !isNullOrUndefined(this.expandCollapseRec)) {
14094
14104
  if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
14095
14105
  startIndex = 0;
@@ -14108,6 +14118,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14108
14118
  }
14109
14119
  this.prevstartIndex = startIndex;
14110
14120
  this.prevendIndex = endIndex;
14121
+ this.prevrequestType = pageingDetails.actionArgs.requestType;
14111
14122
  }
14112
14123
  this.parent.notify('updateAction', pageingDetails);
14113
14124
  };