@syncfusion/ej2-treegrid 21.1.41 → 21.2.3

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.1.41
3
+ * version : 21.2.3
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@21.1.38",
3
+ "_id": "@syncfusion/ej2-treegrid@21.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-yzDLy2soTHvZsUUxZCbJktnCGu6CA99GgvXZGMblq/f97fMtTbeyeaFqdy5c95BLi60jHIaacJqH2JrHFbOBoQ==",
5
+ "_integrity": "sha512-AYO8w6DXiNenGnuNIxGQZUYcFQ73fOKYGi3LAogDdUJltrCYKenVR8eSJktB8bUf34mFwzAtZktha4gPumOYbw==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -19,13 +19,10 @@
19
19
  "_requiredBy": [
20
20
  "/",
21
21
  "/@syncfusion/ej2",
22
- "/@syncfusion/ej2-angular-treegrid",
23
- "/@syncfusion/ej2-gantt",
24
- "/@syncfusion/ej2-react-treegrid",
25
- "/@syncfusion/ej2-vue-treegrid"
22
+ "/@syncfusion/ej2-gantt"
26
23
  ],
27
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.1.38.tgz",
28
- "_shasum": "9b8904acbb4c8e6c2ba33927564ca9e0059a1b5d",
24
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.1.41.tgz",
25
+ "_shasum": "461656857601f4d69e6cd346e1010957f6ba5e79",
29
26
  "_spec": "@syncfusion/ej2-treegrid@*",
30
27
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
31
28
  "author": {
@@ -36,10 +33,10 @@
36
33
  },
37
34
  "bundleDependencies": false,
38
35
  "dependencies": {
39
- "@syncfusion/ej2-base": "~21.1.40",
40
- "@syncfusion/ej2-data": "~21.1.38",
41
- "@syncfusion/ej2-grids": "~21.1.41",
42
- "@syncfusion/ej2-popups": "~21.1.41"
36
+ "@syncfusion/ej2-base": "~21.2.3",
37
+ "@syncfusion/ej2-data": "~21.2.3",
38
+ "@syncfusion/ej2-grids": "~21.2.3",
39
+ "@syncfusion/ej2-popups": "~21.2.3"
43
40
  },
44
41
  "deprecated": false,
45
42
  "description": "Essential JS 2 TreeGrid Component",
@@ -66,6 +63,6 @@
66
63
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
67
64
  },
68
65
  "typings": "index.d.ts",
69
- "version": "21.1.41",
66
+ "version": "21.2.3",
70
67
  "sideEffects": false
71
68
  }
@@ -1067,7 +1067,25 @@ var TreeGrid = /** @class */ (function (_super) {
1067
1067
  };
1068
1068
  };
1069
1069
  TreeGrid.prototype.updateRowTemplate = function () {
1070
- this.treeColumnRowTemplate();
1070
+ var _this = this;
1071
+ if (this.rowTemplate) {
1072
+ if (this.isReact && this.getContentTable().rows.length === 0) {
1073
+ setTimeout(function () {
1074
+ _this.treeColumnRowTemplate();
1075
+ if (_this.enableCollapseAll) {
1076
+ var currentData = _this.getCurrentViewRecords();
1077
+ var rows = _this.getContentTable().rows;
1078
+ for (var i = 0; i < rows.length; i++) {
1079
+ var args = { data: currentData[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)] };
1080
+ _this.renderModule.RowModifier(args);
1081
+ }
1082
+ }
1083
+ }, 0);
1084
+ }
1085
+ else {
1086
+ this.treeColumnRowTemplate();
1087
+ }
1088
+ }
1071
1089
  };
1072
1090
  TreeGrid.prototype.bindedDataSource = function () {
1073
1091
  var dataSource = 'dataSource';
@@ -1110,25 +1128,6 @@ var TreeGrid = /** @class */ (function (_super) {
1110
1128
  if (requestType === 'reorder') {
1111
1129
  _this.notify('getColumnIndex', {});
1112
1130
  }
1113
- if (requestType === 'filterbeforeopen' && args.columnName && _this.filterSettings.hierarchyMode !== 'None') {
1114
- for (var j = 0; j < _this.columns.length; j++) {
1115
- var fields = 'field';
1116
- if (_this.columns[parseInt(j.toString(), 10)]["" + fields] === args.columnName) {
1117
- var taskFields = [];
1118
- for (var i = 0; i < _this.grid.currentViewData.length; i++) {
1119
- var fieldValue = _this.grid.currentViewData[parseInt(i.toString(), 10)][args.columnName];
1120
- if (taskFields.indexOf(fieldValue) === -1) {
1121
- taskFields.push(fieldValue);
1122
- }
1123
- }
1124
- args['filterModel'].options.dataSource = taskFields.map(function (name) {
1125
- var _a;
1126
- return (_a = {}, _a[args.columnName] = name, _a);
1127
- });
1128
- args['filterModel'].options.filteredColumns = args['filterModel'].options.filteredColumns.filter(function (col) { return col.field === args.columnName; });
1129
- }
1130
- }
1131
- }
1132
1131
  if (isRemoteData(_this) && _this.enableVirtualization) {
1133
1132
  if (args.requestType === 'virtualscroll') {
1134
1133
  _this.query.expand('VirtualScrollingAction');
@@ -3259,17 +3258,15 @@ var TreeGrid = /** @class */ (function (_super) {
3259
3258
  }
3260
3259
  };
3261
3260
  TreeGrid.prototype.treeColumnRowTemplate = function () {
3262
- if (this.rowTemplate) {
3263
- var rows = this.getContentTable().rows;
3264
- rows = [].slice.call(rows);
3265
- for (var i = 0; i < rows.length; i++) {
3266
- var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
3267
- .cells[this.treeColumnIndex];
3268
- var row = rows[parseInt(i.toString(), 10)];
3269
- var rowData = this.grid.getRowsObject()[parseInt(i.toString(), 10)].data;
3270
- var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
3271
- this.renderModule.cellRender(arg);
3272
- }
3261
+ var rows = this.getContentTable().rows;
3262
+ rows = [].slice.call(rows);
3263
+ for (var i = 0; i < rows.length; i++) {
3264
+ var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
3265
+ .cells[this.treeColumnIndex];
3266
+ var row = rows[parseInt(i.toString(), 10)];
3267
+ var rowData = this.grid.getRowsObject()[parseInt(i.toString(), 10)].data;
3268
+ var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
3269
+ this.renderModule.cellRender(arg);
3273
3270
  }
3274
3271
  };
3275
3272
  TreeGrid.prototype.collapseRemoteChild = function (rowDetails, isChild) {
@@ -38,10 +38,12 @@ var Render = /** @class */ (function () {
38
38
  var collapsed = (this.parent.initialRender && (!(isNullOrUndefined(parentData[this.parent.expandStateMapping]) ||
39
39
  parentData[this.parent.expandStateMapping]) || this.parent.enableCollapseAll)) ||
40
40
  !getExpandStatus(this.parent, args.data, this.parent.grid.getCurrentViewRecords());
41
- if (collapsed) {
41
+ if (collapsed && !isNullOrUndefined(args.row)) {
42
42
  args.row.style.display = 'none';
43
43
  var rowsObj = this.parent.grid.getRowsObject();
44
- rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0].visible = false;
44
+ if (!isNullOrUndefined(args.row.getAttribute('data-uid'))) {
45
+ rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0].visible = false;
46
+ }
45
47
  }
46
48
  }
47
49
  if (isRemoteData(this.parent) && !isOffline(this.parent)) {
@@ -49,7 +51,7 @@ var Render = /** @class */ (function () {
49
51
  var parentrec = this.parent.getCurrentViewRecords().filter(function (rec) {
50
52
  return getValue(proxy_1.idMapping, rec) === getValue(proxy_1.parentIdMapping, data);
51
53
  });
52
- if (parentrec.length > 0 && !parentrec[0].isSummaryRow) {
54
+ if (parentrec.length > 0 && !parentrec[0].isSummaryRow && !isNullOrUndefined(args.row)) {
53
55
  var display = parentrec[0].expanded ? 'table-row' : 'none';
54
56
  args.row.setAttribute('style', 'display: ' + display + ';');
55
57
  }
@@ -59,15 +61,17 @@ var Render = /** @class */ (function () {
59
61
  if (summaryRow) {
60
62
  addClass([args.row], 'e-summaryrow');
61
63
  }
62
- if (args.row.querySelector('.e-treegridexpand')) {
63
- args.row.setAttribute('aria-expanded', 'true');
64
- }
65
- else if (args.row.querySelector('.e-treegridcollapse')) {
66
- args.row.setAttribute('aria-expanded', 'false');
67
- }
68
- if (this.parent.enableCollapseAll && this.parent.initialRender) {
69
- if (!isNullOrUndefined(data.parentItem)) {
70
- args.row.style.display = 'none';
64
+ if (!isNullOrUndefined(args.row)) {
65
+ if (args.row.querySelector('.e-treegridexpand')) {
66
+ args.row.setAttribute('aria-expanded', 'true');
67
+ }
68
+ else if (args.row.querySelector('.e-treegridcollapse')) {
69
+ args.row.setAttribute('aria-expanded', 'false');
70
+ }
71
+ if (this.parent.enableCollapseAll && this.parent.initialRender) {
72
+ if (!isNullOrUndefined(data.parentItem)) {
73
+ args.row.style.display = 'none';
74
+ }
71
75
  }
72
76
  }
73
77
  var dragStartData = 'dragStartData';