@syncfusion/ej2-treegrid 32.1.21 → 32.1.22

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.
@@ -1618,7 +1618,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1618
1618
  var newSelectedIndexes = [];
1619
1619
  for (var _i = 0, currentlySelectedItemsInOrder_1 = currentlySelectedItemsInOrder; _i < currentlySelectedItemsInOrder_1.length; _i++) {
1620
1620
  var item = currentlySelectedItemsInOrder_1[_i];
1621
- if (item.hasChildRecords && isFilterOrSearch && item.level === 0) {
1621
+ if (item.hasChildRecords && isFilterOrSearch && item.level === 0 && this.parent.autoCheckHierarchy) {
1622
1622
  this.updateParentSelection(item);
1623
1623
  }
1624
1624
  if (item.uniqueID && item.checkboxState === 'check') {
@@ -1950,9 +1950,14 @@ var Selection = /** @__PURE__ @class */ (function () {
1950
1950
  if ((requestType === 'filtering' || requestType === 'searching' || requestType === 'refresh' ||
1951
1951
  requestType === 'sorting' || requestType === 'paging' || requestType === 'expanding' ||
1952
1952
  requestType === 'expand' || requestType === 'collapsing' || requestType === 'collapse') && !isRemoteData(this.parent)) {
1953
- this.selectedItems = [];
1954
- this.selectedUidMap = new Map();
1955
- this.selectedIndexes = [];
1953
+ if (!(isCheckboxcolumn(this.parent) && (requestType === 'refresh' && this.parent['isVirtualExpandCollapse']))) {
1954
+ this.selectedItems = [];
1955
+ this.selectedUidMap = new Map();
1956
+ this.selectedIndexes = [];
1957
+ }
1958
+ if (requestType === 'filtering' || requestType === 'searching' || requestType === 'sorting') {
1959
+ this.headerSelection(false);
1960
+ }
1956
1961
  this.refreshVisibleCheckboxes();
1957
1962
  if (this.parent.autoCheckHierarchy) {
1958
1963
  this.updateHeaderCheckboxState();
@@ -4342,6 +4347,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4342
4347
  _this.freezeColumnRefresh = true;
4343
4348
  _this.componentRefresh = Component.prototype.refresh;
4344
4349
  _this.isComponentRefresh = false;
4350
+ _this.isVirtualExpandCollapse = false;
4345
4351
  _this.objectEqualityChecker = function (old, current) {
4346
4352
  if (old) {
4347
4353
  var keys = Object.keys(old);
@@ -5831,6 +5837,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5831
5837
  _this.notify(batchSave, args);
5832
5838
  }
5833
5839
  _this.notify('updateGridActions', args);
5840
+ _this.isVirtualExpandCollapse = false;
5834
5841
  if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
5835
5842
  _this.grid.refresh();
5836
5843
  }
@@ -16266,6 +16273,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
16266
16273
  count: this.parent.flatData.length
16267
16274
  };
16268
16275
  this.handleSelection();
16276
+ this.parent['isVirtualExpandCollapse'] = true;
16269
16277
  var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
16270
16278
  getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: requestType });
16271
16279
  };