@syncfusion/ej2-treegrid 23.2.4 → 23.2.7

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.
@@ -4343,6 +4343,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4343
4343
  var root = 'root';
4344
4344
  this.grid["" + root] = this["" + root] ? this["" + root] : this;
4345
4345
  this.grid.appendTo(gridContainer);
4346
+ var gridContent = this.element.getElementsByClassName('e-gridcontent')[0].childNodes[0];
4347
+ gridContent.setAttribute('tabindex', '0');
4348
+ var contentTable = this.element.getElementsByClassName('e-content')[0].querySelector('.e-table');
4349
+ contentTable.setAttribute('role', 'treegrid');
4346
4350
  if (this.isIndentEnabled) {
4347
4351
  this.refreshToolbarItems();
4348
4352
  }
@@ -6039,7 +6043,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6039
6043
  }
6040
6044
  else if (column.field) {
6041
6045
  var currentColumn = _this.grid.getColumnByField(column.field);
6042
- column.width = currentColumn.width;
6046
+ if (!isNullOrUndefined(currentColumn)) {
6047
+ column.width = currentColumn.width;
6048
+ }
6043
6049
  }
6044
6050
  });
6045
6051
  };
@@ -7085,11 +7091,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7085
7091
  TreeGrid.prototype.treeColumnRowTemplate = function () {
7086
7092
  var rows = this.getContentTable().rows;
7087
7093
  rows = [].slice.call(rows);
7094
+ var rowsObject = this.grid.getRowsObject();
7088
7095
  for (var i = 0; i < rows.length; i++) {
7089
7096
  var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
7090
7097
  .cells[this.treeColumnIndex];
7091
7098
  var row = rows[parseInt(i.toString(), 10)];
7092
- var rowData = this.grid.getRowsObject()[parseInt(i.toString(), 10)].data;
7099
+ var rowData = rowsObject.length != 0 ? rowsObject[parseInt(i.toString(), 10)].data : new Object();
7093
7100
  var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
7094
7101
  this.renderModule.cellRender(arg);
7095
7102
  }
@@ -9998,7 +10005,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
9998
10005
  if (!this.isLocal()) {
9999
10006
  this.parent.flatData = [];
10000
10007
  }
10001
- if (property && property.dataSource && this.isLocal()) {
10008
+ if (property && property.dataSource) {
10002
10009
  var flatsData = this.parent.flatData;
10003
10010
  var dataSrc = property.dataSource instanceof DataManager ? property.dataSource.dataSource.json : property.dataSource;
10004
10011
  this.parent.dataModule.convertToFlatData(dataSrc);
@@ -10192,7 +10199,7 @@ var PdfExport$1 = /** @__PURE__ @class */ (function () {
10192
10199
  if (!isLocal) {
10193
10200
  this.parent.flatData = [];
10194
10201
  }
10195
- if (prop && prop.dataSource && isLocal) {
10202
+ if (prop && prop.dataSource) {
10196
10203
  var flatDatas = this.parent.flatData;
10197
10204
  var dataSrc = prop.dataSource instanceof DataManager ? prop.dataSource.dataSource.json : prop.dataSource;
10198
10205
  this.parent.dataModule.convertToFlatData(dataSrc);
@@ -12092,7 +12099,6 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12092
12099
  if (this.parent.editSettings.mode === 'Cell' && this.parent.element.querySelector('form')) {
12093
12100
  args.cancel = true;
12094
12101
  var editModule = 'editModule';
12095
- setValue('isEdit', false, this.parent.grid);
12096
12102
  setValue('isEditCollapse', true, this.parent);
12097
12103
  args.rowData[args.columnName] = args.value;
12098
12104
  var row_1;
@@ -12149,6 +12155,7 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12149
12155
  }
12150
12156
  else {
12151
12157
  this.updateCell(args, rowIndex_1);
12158
+ setValue('isEdit', false, this.parent.grid);
12152
12159
  this.afterCellSave(args, row_1, rowIndex_1);
12153
12160
  }
12154
12161
  }
@@ -12157,6 +12164,7 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12157
12164
  var query = this.parent.grid.query;
12158
12165
  if (this.parent['isGantt'] && !this.parent.loadChildOnDemand) {
12159
12166
  this.updateCell(args, rowIndex_1);
12167
+ setValue('isEdit', false, this.parent.grid);
12160
12168
  this.afterCellSave(args, row_1, rowIndex_1);
12161
12169
  }
12162
12170
  else {
@@ -12167,6 +12175,7 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12167
12175
  args.rowData[args.columnName] = e[args.columnName];
12168
12176
  }
12169
12177
  _this.updateCell(args, rowIndex_1);
12178
+ setValue('isEdit', false, _this.parent.grid);
12170
12179
  _this.afterCellSave(args, row_1, rowIndex_1);
12171
12180
  });
12172
12181
  }