@syncfusion/ej2-treegrid 20.2.46 → 20.2.49

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 : 20.2.46
3
+ * version : 20.2.49
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@20.2.45",
3
+ "_id": "@syncfusion/ej2-treegrid@20.2.46",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-DHlvVmftx1FJ8oOvYex8mPsEs5UaO1OOLy3HBjPD7VzRakVp0MXfuuL1fjGxdIBgfgxnm2BdZbpoaMKBpocj4w==",
5
+ "_integrity": "sha512-0SyT77dBgVOM2dMvYAZTKTa1lbiUkc2eAQXOWT+BUE0AS5gJZu2W7kNchvvayJVtor/3u3SkoUVg8lOsDy3eUw==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.2.45.tgz",
28
- "_shasum": "51398d20b4de093ab6ff0a38f58fd0d30db95247",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.2.46.tgz",
28
+ "_shasum": "f7e5f74d66bffde32c3c7b995b213375cc3773c9",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~20.2.46",
39
+ "@syncfusion/ej2-base": "~20.2.48",
40
40
  "@syncfusion/ej2-data": "~20.2.45",
41
- "@syncfusion/ej2-grids": "~20.2.46",
42
- "@syncfusion/ej2-popups": "~20.2.45"
41
+ "@syncfusion/ej2-grids": "~20.2.49",
42
+ "@syncfusion/ej2-popups": "~20.2.49"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -60,6 +60,6 @@
60
60
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
61
61
  },
62
62
  "typings": "index.d.ts",
63
- "version": "20.2.46",
63
+ "version": "20.2.49",
64
64
  "sideEffects": false
65
65
  }
@@ -155,10 +155,6 @@ var Filter = /** @class */ (function () {
155
155
  }
156
156
  }
157
157
  else {
158
- if ((!this.parent.enableCollapseAll || !this.parent.initialRender && isNullOrUndefined(this.parent['dataResults']['result']))
159
- && parent['expanded'] === false && this.parent.getVisibleRecords().indexOf(record) === -1) {
160
- this.parent.expandRow(this.parent.getRows()[parent['index']], parent);
161
- }
162
158
  this.addParentRecord(parent);
163
159
  }
164
160
  }
@@ -266,6 +266,8 @@ var Selection = /** @class */ (function () {
266
266
  var _this = this;
267
267
  var index = -1;
268
268
  var length = 0;
269
+ //This property used to maintain the check state of the currentview data after clear filtering
270
+ var multiFilterCheckState = false;
269
271
  if (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) {
270
272
  var filterResult = this.parent.filterModule.filteredResult;
271
273
  if (this.filteredList.length === 0) {
@@ -274,6 +276,10 @@ var Selection = /** @class */ (function () {
274
276
  else {
275
277
  if (this.filteredList !== filterResult) {
276
278
  this.filteredList = filterResult;
279
+ multiFilterCheckState = true;
280
+ }
281
+ else {
282
+ multiFilterCheckState = false;
277
283
  }
278
284
  }
279
285
  }
@@ -292,6 +298,9 @@ var Selection = /** @class */ (function () {
292
298
  if (data[i].checkboxState === 'check') {
293
299
  continue;
294
300
  }
301
+ if (multiFilterCheckState) {
302
+ continue;
303
+ }
295
304
  data[i].checkboxState = 'check';
296
305
  this.updateSelectedItems(data[i], data[i].checkboxState);
297
306
  }
@@ -43,53 +43,55 @@ var Toolbar = /** @class */ (function () {
43
43
  this.parent.off(events.toolbarClick, this.toolbarClickHandler);
44
44
  };
45
45
  Toolbar.prototype.refreshToolbar = function (args) {
46
- var tObj = this.parent;
47
- var indentElement;
48
- var outdentElement;
49
- var indentID = tObj.element.id + '_gridcontrol_indent';
50
- var outdentID = tObj.element.id + '_gridcontrol_outdent';
51
46
  var toolbarElement = this.parent.grid.toolbarModule.getToolbar();
52
- var indentEle = toolbarElement.querySelector('#' + indentID);
53
- var outdentEle = toolbarElement.querySelector('#' + outdentID);
54
- var row = args.row;
55
- var selectedrow = tObj.getSelectedRows()[0];
56
- if (!isNullOrUndefined(row[0])) {
57
- row = row[0];
58
- }
59
- row = (!isNullOrUndefined(selectedrow) && selectedrow.rowIndex !== row.rowIndex) ? selectedrow : row;
60
- if (indentEle !== null && outdentEle !== null) {
61
- indentElement = toolbarElement.querySelector('#' + indentID).parentElement;
62
- outdentElement = toolbarElement.querySelector('#' + outdentID).parentElement;
63
- if (row.rowIndex === 0 || tObj.getSelectedRowIndexes().length > 1) {
64
- indentElement.classList.add('e-hidden');
65
- outdentElement.classList.add('e-hidden');
47
+ if (!isNullOrUndefined(toolbarElement)) {
48
+ var tObj = this.parent;
49
+ var indentElement = void 0;
50
+ var outdentElement = void 0;
51
+ var indentID = tObj.element.id + '_gridcontrol_indent';
52
+ var outdentID = tObj.element.id + '_gridcontrol_outdent';
53
+ var indentEle = toolbarElement.querySelector('#' + indentID);
54
+ var outdentEle = toolbarElement.querySelector('#' + outdentID);
55
+ var row = args.row;
56
+ var selectedrow = tObj.getSelectedRows()[0];
57
+ if (!isNullOrUndefined(row[0])) {
58
+ row = row[0];
66
59
  }
67
- else if (args['name'] !== 'rowDeselected' || (!isNullOrUndefined(selectedrow) && tObj.grid.isCheckBoxSelection)) {
68
- var selectedItem = tObj.getCurrentViewRecords()[row.rowIndex];
69
- if (!isNullOrUndefined(selectedItem)) {
70
- if ((selectedItem.level > tObj.getCurrentViewRecords()[row.rowIndex - 1].level)) {
71
- indentElement.classList.add('e-hidden');
72
- }
73
- else {
74
- indentElement.classList.remove('e-hidden');
60
+ row = (!isNullOrUndefined(selectedrow) && selectedrow.rowIndex !== row.rowIndex) ? selectedrow : row;
61
+ if (indentEle !== null && outdentEle !== null) {
62
+ indentElement = toolbarElement.querySelector('#' + indentID).parentElement;
63
+ outdentElement = toolbarElement.querySelector('#' + outdentID).parentElement;
64
+ if (row.rowIndex === 0 || tObj.getSelectedRowIndexes().length > 1) {
65
+ indentElement.classList.add('e-hidden');
66
+ outdentElement.classList.add('e-hidden');
67
+ }
68
+ else if (args['name'] !== 'rowDeselected' || (!isNullOrUndefined(selectedrow) && tObj.grid.isCheckBoxSelection)) {
69
+ var selectedItem = tObj.getCurrentViewRecords()[row.rowIndex];
70
+ if (!isNullOrUndefined(selectedItem)) {
71
+ if ((selectedItem.level > tObj.getCurrentViewRecords()[row.rowIndex - 1].level)) {
72
+ indentElement.classList.add('e-hidden');
73
+ }
74
+ else {
75
+ indentElement.classList.remove('e-hidden');
76
+ }
77
+ if (selectedItem.level === tObj.getCurrentViewRecords()[row.rowIndex - 1].level) {
78
+ indentElement.classList.remove('e-hidden');
79
+ }
80
+ if (selectedItem.level === 0) {
81
+ outdentElement.classList.add('e-hidden');
82
+ }
83
+ if (selectedItem.level !== 0) {
84
+ outdentElement.classList.remove('e-hidden');
85
+ }
75
86
  }
76
- if (selectedItem.level === tObj.getCurrentViewRecords()[row.rowIndex - 1].level) {
77
- indentElement.classList.remove('e-hidden');
87
+ }
88
+ if (args['name'] === 'rowDeselected' && isNullOrUndefined(selectedrow) && !tObj.grid.isCheckBoxSelection) {
89
+ if (this.parent.toolbar['includes']('Indent')) {
90
+ indentElement.classList.add('e-hidden');
78
91
  }
79
- if (selectedItem.level === 0) {
92
+ if (this.parent.toolbar['includes']('Outdent')) {
80
93
  outdentElement.classList.add('e-hidden');
81
94
  }
82
- if (selectedItem.level !== 0) {
83
- outdentElement.classList.remove('e-hidden');
84
- }
85
- }
86
- }
87
- if (args['name'] === 'rowDeselected' && isNullOrUndefined(selectedrow) && !tObj.grid.isCheckBoxSelection) {
88
- if (this.parent.toolbar['includes']('Indent')) {
89
- indentElement.classList.add('e-hidden');
90
- }
91
- if (this.parent.toolbar['includes']('Outdent')) {
92
- outdentElement.classList.add('e-hidden');
93
95
  }
94
96
  }
95
97
  }
@@ -1126,6 +1126,19 @@ var TreeGrid = /** @class */ (function (_super) {
1126
1126
  if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
1127
1127
  _this.grid.refresh();
1128
1128
  }
1129
+ if (args.action === 'filter') {
1130
+ if (_this.filterModule['currentFilterObject'] !== '' && _this.enableVirtualization && !_this.initialRender) {
1131
+ _this.expandAll();
1132
+ }
1133
+ }
1134
+ if (args.requestType === 'searching') {
1135
+ if (_this.searchSettings.key !== '' && _this.enableVirtualization && !_this.initialRender) {
1136
+ _this.expandAll();
1137
+ }
1138
+ }
1139
+ if (args.action === 'clearFilter' && _this.enableCollapseAll) {
1140
+ _this.collapseAll();
1141
+ }
1129
1142
  if (_this.action === 'indenting' || _this.action === 'outdenting') {
1130
1143
  _this.action = _this.action === 'indenting' ? 'indented' : 'outdented';
1131
1144
  var selectedItem_1 = [_this.selectedRecords];