@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.
@@ -1499,7 +1499,7 @@ class Selection {
1499
1499
  const newSelectedUidMap = new Map();
1500
1500
  const newSelectedIndexes = [];
1501
1501
  for (const item of currentlySelectedItemsInOrder) {
1502
- if (item.hasChildRecords && isFilterOrSearch && item.level === 0) {
1502
+ if (item.hasChildRecords && isFilterOrSearch && item.level === 0 && this.parent.autoCheckHierarchy) {
1503
1503
  this.updateParentSelection(item);
1504
1504
  }
1505
1505
  if (item.uniqueID && item.checkboxState === 'check') {
@@ -1828,9 +1828,14 @@ class Selection {
1828
1828
  if ((requestType === 'filtering' || requestType === 'searching' || requestType === 'refresh' ||
1829
1829
  requestType === 'sorting' || requestType === 'paging' || requestType === 'expanding' ||
1830
1830
  requestType === 'expand' || requestType === 'collapsing' || requestType === 'collapse') && !isRemoteData(this.parent)) {
1831
- this.selectedItems = [];
1832
- this.selectedUidMap = new Map();
1833
- this.selectedIndexes = [];
1831
+ if (!(isCheckboxcolumn(this.parent) && (requestType === 'refresh' && this.parent['isVirtualExpandCollapse']))) {
1832
+ this.selectedItems = [];
1833
+ this.selectedUidMap = new Map();
1834
+ this.selectedIndexes = [];
1835
+ }
1836
+ if (requestType === 'filtering' || requestType === 'searching' || requestType === 'sorting') {
1837
+ this.headerSelection(false);
1838
+ }
1834
1839
  this.refreshVisibleCheckboxes();
1835
1840
  if (this.parent.autoCheckHierarchy) {
1836
1841
  this.updateHeaderCheckboxState();
@@ -4029,6 +4034,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4029
4034
  this.freezeColumnRefresh = true;
4030
4035
  this.componentRefresh = Component.prototype.refresh;
4031
4036
  this.isComponentRefresh = false;
4037
+ this.isVirtualExpandCollapse = false;
4032
4038
  this.objectEqualityChecker = (old, current) => {
4033
4039
  if (old) {
4034
4040
  const keys = Object.keys(old);
@@ -5501,6 +5507,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5501
5507
  this.notify(batchSave, args);
5502
5508
  }
5503
5509
  this.notify('updateGridActions', args);
5510
+ this.isVirtualExpandCollapse = false;
5504
5511
  if (args.requestType === 'save' && this.aggregates.map((ag) => ag.showChildSummary === true).length) {
5505
5512
  this.grid.refresh();
5506
5513
  }
@@ -15758,6 +15765,7 @@ class VirtualScroll {
15758
15765
  count: this.parent.flatData.length
15759
15766
  };
15760
15767
  this.handleSelection();
15768
+ this.parent['isVirtualExpandCollapse'] = true;
15761
15769
  const requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
15762
15770
  getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: requestType });
15763
15771
  }