@syncfusion/ej2-treegrid 32.1.21 → 32.1.22-1533505

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);
@@ -4821,12 +4827,18 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4821
4827
  this.renderComplete();
4822
4828
  const destroyTemplate = 'destroyTemplate';
4823
4829
  const destroyTemplateFn = this.grid[`${destroyTemplate}`];
4830
+ const isGantt = this['isFromGantt'] && this.isReact;
4824
4831
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4825
4832
  this.grid[`${destroyTemplate}`] = (args, index, callback) => {
4826
4833
  destroyTemplateFn.apply(this.grid);
4827
4834
  const portals = 'portals';
4828
4835
  if (!(this.isReact && isNullOrUndefined(this[`${portals}`]))) {
4829
- this.clearTemplate(args, index, callback);
4836
+ if (isGantt) {
4837
+ this['root'].clearTemplate(args, index, callback);
4838
+ }
4839
+ else {
4840
+ this.clearTemplate(args, index, callback);
4841
+ }
4830
4842
  }
4831
4843
  else if (!isNullOrUndefined(callback)) {
4832
4844
  callback();
@@ -5501,6 +5513,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5501
5513
  this.notify(batchSave, args);
5502
5514
  }
5503
5515
  this.notify('updateGridActions', args);
5516
+ this.isVirtualExpandCollapse = false;
5504
5517
  if (args.requestType === 'save' && this.aggregates.map((ag) => ag.showChildSummary === true).length) {
5505
5518
  this.grid.refresh();
5506
5519
  }
@@ -6512,6 +6525,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6512
6525
  const table = this.getContentTable();
6513
6526
  const sHeight = table.scrollHeight;
6514
6527
  const clientHeight = this.getContent().clientHeight;
6528
+ removeClass(table.querySelectorAll('td.e-lastrowcell'), 'e-lastrowcell');
6515
6529
  this.lastRowBorder(this.getRows()[currentRecords.indexOf(record)], sHeight <= clientHeight);
6516
6530
  }
6517
6531
  }
@@ -15758,6 +15772,7 @@ class VirtualScroll {
15758
15772
  count: this.parent.flatData.length
15759
15773
  };
15760
15774
  this.handleSelection();
15775
+ this.parent['isVirtualExpandCollapse'] = true;
15761
15776
  const requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
15762
15777
  getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: requestType });
15763
15778
  }