@syncfusion/ej2-treegrid 20.1.51 → 20.1.52

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.
@@ -884,10 +884,12 @@ class Selection {
884
884
  getCheckboxcolumnIndex() {
885
885
  let mappingUid;
886
886
  let columnIndex;
887
- const columns = (this.parent.columns);
887
+ const stackedHeader = "stackedHeader";
888
+ const columnModel = 'columnModel';
889
+ const columns = this.parent[stackedHeader] ? this.parent[columnModel] : (this.parent.columns);
888
890
  for (let col = 0; col < columns.length; col++) {
889
891
  if (columns[col].showCheckbox) {
890
- mappingUid = this.parent.columns[col].uid;
892
+ mappingUid = columns[col].uid;
891
893
  }
892
894
  }
893
895
  const headerCelllength = this.parent.getHeaderContent().querySelectorAll('.e-headercelldiv').length;
@@ -2986,6 +2988,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
2986
2988
  this.addedRecords = 'addedRecords';
2987
2989
  this.indentOutdentAction = 'indentOutdentAction';
2988
2990
  this.modifiedRecords = [];
2991
+ this.stackedHeader = false;
2989
2992
  this.objectEqualityChecker = (old, current) => {
2990
2993
  if (old) {
2991
2994
  const keys = Object.keys(old);
@@ -4927,7 +4930,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4927
4930
  * @returns {Column} - Returns tree grid column
4928
4931
  */
4929
4932
  getColumnByUid(uid) {
4930
- const Columns = this.initialRender ? this.grid.columns : this.columns;
4933
+ let Columns = this.initialRender ? this.grid.columns : this.columns;
4934
+ const columnModel = 'columnModel';
4935
+ if (this.grid.columns.length !== this.columnModel.length) {
4936
+ Columns = this.grid[columnModel];
4937
+ }
4931
4938
  return iterateArrayOrObject(Columns, (item) => {
4932
4939
  if (item.uid === uid) {
4933
4940
  return item;
@@ -5055,7 +5062,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5055
5062
  temp = this.columnModel[this.treeColumnIndex].template;
5056
5063
  field = this.columnModel[this.treeColumnIndex].field;
5057
5064
  }
5058
- let stackedHeader = false;
5059
5065
  let gridColumn;
5060
5066
  if (!this.enableColumnVirtualization || (this.enableColumnVirtualization && this.columnModel.length === gridColumns.length)) {
5061
5067
  this.columnModel = [];
@@ -5073,9 +5079,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5073
5079
  const merge$$1 = 'deepMerge';
5074
5080
  this[merge$$1] = ['columns']; // Workaround for blazor updateModel
5075
5081
  if (this.grid.columns.length !== this.columnModel.length) {
5076
- stackedHeader = true;
5082
+ this.stackedHeader = true;
5077
5083
  }
5078
- if (!stackedHeader) {
5084
+ if (!this.stackedHeader) {
5079
5085
  this.setProperties({ columns: this.columnModel }, true);
5080
5086
  }
5081
5087
  this[merge$$1] = undefined; // Workaround for blazor updateModel