@syncfusion/ej2-treegrid 20.3.50 → 20.3.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.
@@ -924,6 +924,7 @@ var Selection = /** @__PURE__ @class */ (function () {
924
924
  this.selectedItems = [];
925
925
  this.selectedIndexes = [];
926
926
  this.filteredList = [];
927
+ this.searchingRecords = [];
927
928
  this.addEventListener();
928
929
  }
929
930
  /**
@@ -1178,6 +1179,9 @@ var Selection = /** @__PURE__ @class */ (function () {
1178
1179
  if (this.filteredList.length === 0) {
1179
1180
  this.filteredList = filterResult;
1180
1181
  }
1182
+ if (this.parent.grid.searchSettings.key.length) {
1183
+ this.searchingRecords = filterResult;
1184
+ }
1181
1185
  else {
1182
1186
  if (this.filteredList !== filterResult) {
1183
1187
  this.filteredList = filterResult;
@@ -1189,9 +1193,12 @@ var Selection = /** @__PURE__ @class */ (function () {
1189
1193
  }
1190
1194
  }
1191
1195
  if (this.filteredList.length > 0) {
1192
- if (!this.parent.filterSettings.columns.length && this.filteredList.length) {
1196
+ if (!this.parent.filterSettings.columns.length && this.filteredList.length && !this.parent.grid.searchSettings.key.length) {
1193
1197
  this.filteredList = [];
1194
1198
  }
1199
+ if (this.searchingRecords.length && !isNullOrUndefined(checkAll)) {
1200
+ this.filteredList = this.searchingRecords;
1201
+ }
1195
1202
  }
1196
1203
  var data = (!isNullOrUndefined(this.parent.filterModule) &&
1197
1204
  (this.filteredList.length > 0)) ? this.filteredList :
@@ -5709,8 +5716,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5709
5716
  if (this.editSettings.mode === 'Batch') {
5710
5717
  var obj = 'dialogObj';
5711
5718
  var showDialog = 'showDialog';
5712
- if (this.getBatchChanges()[this.changedRecords].length ||
5713
- this.getBatchChanges()[this.deletedRecords].length || this.getBatchChanges()[this.addedRecords].length) {
5719
+ if ((this.getBatchChanges()[this.changedRecords].length ||
5720
+ this.getBatchChanges()[this.deletedRecords].length || this.getBatchChanges()[this.addedRecords].length)
5721
+ && this.editSettings.showConfirmDialog) {
5714
5722
  var dialogObj = this.grid.editModule[obj];
5715
5723
  this.grid.editModule[showDialog]('CancelEdit', dialogObj);
5716
5724
  this.targetElement = target;
@@ -6167,20 +6175,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6167
6175
  }
6168
6176
  this.notify('rowExpandCollapse', { detailrows: detailrows, action: displayAction, record: record, row: row });
6169
6177
  this.updateAltRow(gridRows);
6170
- this.updateGridRowsVisible();
6171
- }
6172
- };
6173
- TreeGrid.prototype.updateGridRowsVisible = function () {
6174
- var rowsToRefresh = this.grid.getRowsObject();
6175
- var rows = this.getRows();
6176
- for (var i = 0; i < rows.length; i++) {
6177
- for (var j = 0; j < rowsToRefresh.length; j++) {
6178
- if (rows[i].dataset.uid === rowsToRefresh[j].uid) {
6179
- rowsToRefresh[j].visible = rows[i].style.display === 'none' ? false : true;
6180
- }
6181
- }
6182
6178
  }
6183
- this.grid.notify('refresh-Expand-and-Collapse', { rows: rowsToRefresh });
6184
6179
  };
6185
6180
  TreeGrid.prototype.updateChildOnDemand = function (expandingArgs) {
6186
6181
  var _this = this;
@@ -9552,6 +9547,8 @@ var Page$1 = /** @__PURE__ @class */ (function () {
9552
9547
  */
9553
9548
  Page$$1.prototype.collapseExpandPagedchilds = function (rowDetails) {
9554
9549
  rowDetails.record.expanded = rowDetails.action === 'collapse' ? false : true;
9550
+ this.parent.flatData.map(function (e) { return e.expanded = e.uniqueID === rowDetails.record.uniqueID &&
9551
+ e.expanded !== rowDetails.record.expanded ? rowDetails.record.expanded : e.expanded; });
9555
9552
  if (this.parent.enableImmutableMode) {
9556
9553
  var primaryKeyField_1 = this.parent.getPrimaryKeyFieldNames()[0];
9557
9554
  var record = this.parent.flatData.filter(function (e) {