@syncfusion/ej2-treegrid 23.1.43 → 23.2.6

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.
@@ -534,7 +534,7 @@ class TreeClipboard extends Clipboard {
534
534
  this.treeCopyContent += '\n';
535
535
  }
536
536
  if (!rows[selectedIndexes[parseInt(i.toString(), 10)]].classList.contains('e-summaryrow')) {
537
- const cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell'));
537
+ const cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell:not(.e-hide)'));
538
538
  const uniqueid = this.treeGridParent.getSelectedRecords()[parseInt(i.toString(), 10)][`${uniqueID}`];
539
539
  if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
540
540
  if (this.treeGridParent.copyHierarchyMode === 'Parent' || this.treeGridParent.copyHierarchyMode === 'Both') {
@@ -596,7 +596,7 @@ class TreeClipboard extends Clipboard {
596
596
  if (!isNullOrUndefined(currentRecords[parseInt(selectedIndex.toString(), 10)][`${parentItem}`]) &&
597
597
  currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`] === currentRecords[parseInt(selectedIndex.toString(), 10)][`${parentItem}`][`${uniqueID}`]) {
598
598
  selectedIndex = j;
599
- const cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell'));
599
+ const cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell:not(.e-hide)'));
600
600
  const uniqueid = currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`];
601
601
  if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
602
602
  this[`${getCopyData}`](cells, false, '\t', withHeader);
@@ -651,7 +651,7 @@ class TreeClipboard extends Clipboard {
651
651
  for (let j = 0; j < currentRecords.length; j++) {
652
652
  if (!isNullOrUndefined(childData[parseInt(i.toString(), 10)][`${uniqueID}`]) && currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`] === childData[parseInt(i.toString(), 10)][`${uniqueID}`]) {
653
653
  if ((!isNullOrUndefined(rows[parseInt(j.toString(), 10)])) && !rows[parseInt(j.toString(), 10)].classList.contains('e-summaryrow')) {
654
- const cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell'));
654
+ const cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell:not(.e-hide)'));
655
655
  const uniqueid = currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`];
656
656
  if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
657
657
  this[`${getCopyData}`](cells, false, '\t', withHeader);
@@ -1251,7 +1251,7 @@ class Selection {
1251
1251
  (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0))) {
1252
1252
  this.selectedItems.push(checkedRecord);
1253
1253
  }
1254
- if (this.selectedItems.indexOf(checkedRecord) === -1 && this.parent.enableVirtualization && ((!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0))) {
1254
+ if (this.selectedItems.indexOf(checkedRecord) === -1 && (this.parent.enableVirtualization || this.parent.allowPaging) && ((!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0))) {
1255
1255
  this.selectedItems.push(checkedRecord);
1256
1256
  }
1257
1257
  if (this.selectedItems.indexOf(checkedRecord) === -1 && (!isNullOrUndefined(this.parent.filterModule) &&
@@ -1325,7 +1325,7 @@ class Selection {
1325
1325
  this.selectedItems = [];
1326
1326
  this.selectedIndexes = [];
1327
1327
  childData = (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) ?
1328
- this.parent.getCurrentViewRecords() : this.parent.flatData;
1328
+ this.parent.filterModule.filteredResult : this.parent.flatData;
1329
1329
  childData.forEach((record) => {
1330
1330
  if (this.parent.enableVirtualization) {
1331
1331
  if (record.hasChildRecords && record.childRecords.length > 0) {
@@ -4052,6 +4052,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4052
4052
  const root = 'root';
4053
4053
  this.grid[`${root}`] = this[`${root}`] ? this[`${root}`] : this;
4054
4054
  this.grid.appendTo(gridContainer);
4055
+ const gridContent = this.element.getElementsByClassName('e-gridcontent')[0].childNodes[0];
4056
+ gridContent.setAttribute('tabindex', '0');
4057
+ const contentTable = this.element.getElementsByClassName('e-content')[0].querySelector('.e-table');
4058
+ contentTable.setAttribute('role', 'treegrid');
4055
4059
  if (this.isIndentEnabled) {
4056
4060
  this.refreshToolbarItems();
4057
4061
  }
@@ -4946,9 +4950,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4946
4950
  let requireRefresh = false;
4947
4951
  for (const prop of properties) {
4948
4952
  switch (prop) {
4949
- case 'columns':
4950
- this.grid.columns = this.getGridColumns(this.columns);
4951
- break;
4952
4953
  case 'treeColumnIndex':
4953
4954
  this.grid.refreshColumns();
4954
4955
  break;
@@ -5736,7 +5737,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5736
5737
  }
5737
5738
  else if (column.field) {
5738
5739
  const currentColumn = this.grid.getColumnByField(column.field);
5739
- column.width = currentColumn.width;
5740
+ if (!isNullOrUndefined(currentColumn)) {
5741
+ column.width = currentColumn.width;
5742
+ }
5740
5743
  }
5741
5744
  });
5742
5745
  }
@@ -9621,7 +9624,7 @@ class ExcelExport$1 {
9621
9624
  if (!this.isLocal()) {
9622
9625
  this.parent.flatData = [];
9623
9626
  }
9624
- if (property && property.dataSource && this.isLocal()) {
9627
+ if (property && property.dataSource) {
9625
9628
  const flatsData = this.parent.flatData;
9626
9629
  const dataSrc = property.dataSource instanceof DataManager ? property.dataSource.dataSource.json : property.dataSource;
9627
9630
  this.parent.dataModule.convertToFlatData(dataSrc);
@@ -9813,7 +9816,7 @@ class PdfExport$1 {
9813
9816
  if (!isLocal) {
9814
9817
  this.parent.flatData = [];
9815
9818
  }
9816
- if (prop && prop.dataSource && isLocal) {
9819
+ if (prop && prop.dataSource) {
9817
9820
  const flatDatas = this.parent.flatData;
9818
9821
  const dataSrc = prop.dataSource instanceof DataManager ? prop.dataSource.dataSource.json : prop.dataSource;
9819
9822
  this.parent.dataModule.convertToFlatData(dataSrc);
@@ -11692,7 +11695,6 @@ class Edit$1 {
11692
11695
  if (this.parent.editSettings.mode === 'Cell' && this.parent.element.querySelector('form')) {
11693
11696
  args.cancel = true;
11694
11697
  const editModule = 'editModule';
11695
- setValue('isEdit', false, this.parent.grid);
11696
11698
  setValue('isEditCollapse', true, this.parent);
11697
11699
  args.rowData[args.columnName] = args.value;
11698
11700
  let row;
@@ -11749,6 +11751,7 @@ class Edit$1 {
11749
11751
  }
11750
11752
  else {
11751
11753
  this.updateCell(args, rowIndex);
11754
+ setValue('isEdit', false, this.parent.grid);
11752
11755
  this.afterCellSave(args, row, rowIndex);
11753
11756
  }
11754
11757
  }
@@ -11757,6 +11760,7 @@ class Edit$1 {
11757
11760
  const query = this.parent.grid.query;
11758
11761
  if (this.parent['isGantt'] && !this.parent.loadChildOnDemand) {
11759
11762
  this.updateCell(args, rowIndex);
11763
+ setValue('isEdit', false, this.parent.grid);
11760
11764
  this.afterCellSave(args, row, rowIndex);
11761
11765
  }
11762
11766
  else {
@@ -11767,6 +11771,7 @@ class Edit$1 {
11767
11771
  args.rowData[args.columnName] = e[args.columnName];
11768
11772
  }
11769
11773
  this.updateCell(args, rowIndex);
11774
+ setValue('isEdit', false, this.parent.grid);
11770
11775
  this.afterCellSave(args, row, rowIndex);
11771
11776
  });
11772
11777
  }
@@ -13267,7 +13272,7 @@ class VirtualScroll$1 {
13267
13272
  else {
13268
13273
  const requestType = pageingDetails.actionArgs.requestType;
13269
13274
  if (requestType === 'filtering' || requestType === 'collapseAll' || requestType === 'searching' ||
13270
- (requestType === 'refresh' && this.parent.enableCollapseAll && endIndex > visualData.length)) {
13275
+ (requestType === 'refresh' && this.parent.enableCollapseAll && endIndex > visualData.length && isNullOrUndefined(this.expandCollapseRec))) {
13271
13276
  startIndex = 0;
13272
13277
  endIndex = this.parent.grid.pageSettings.pageSize - 1;
13273
13278
  this.parent.grid.getContent().firstElementChild.scrollTop = 0;