@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.
- package/CHANGELOG.md +2 -0
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +66 -46
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +66 -46
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/treegrid/actions/filter.js +0 -4
- package/src/treegrid/actions/selection.js +9 -0
- package/src/treegrid/actions/toolbar.js +43 -41
- package/src/treegrid/base/treegrid.js +13 -0
|
@@ -1142,6 +1142,8 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1142
1142
|
var _this = this;
|
|
1143
1143
|
var index = -1;
|
|
1144
1144
|
var length = 0;
|
|
1145
|
+
//This property used to maintain the check state of the currentview data after clear filtering
|
|
1146
|
+
var multiFilterCheckState = false;
|
|
1145
1147
|
if (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) {
|
|
1146
1148
|
var filterResult = this.parent.filterModule.filteredResult;
|
|
1147
1149
|
if (this.filteredList.length === 0) {
|
|
@@ -1150,6 +1152,10 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1150
1152
|
else {
|
|
1151
1153
|
if (this.filteredList !== filterResult) {
|
|
1152
1154
|
this.filteredList = filterResult;
|
|
1155
|
+
multiFilterCheckState = true;
|
|
1156
|
+
}
|
|
1157
|
+
else {
|
|
1158
|
+
multiFilterCheckState = false;
|
|
1153
1159
|
}
|
|
1154
1160
|
}
|
|
1155
1161
|
}
|
|
@@ -1168,6 +1174,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1168
1174
|
if (data[i].checkboxState === 'check') {
|
|
1169
1175
|
continue;
|
|
1170
1176
|
}
|
|
1177
|
+
if (multiFilterCheckState) {
|
|
1178
|
+
continue;
|
|
1179
|
+
}
|
|
1171
1180
|
data[i].checkboxState = 'check';
|
|
1172
1181
|
this.updateSelectedItems(data[i], data[i].checkboxState);
|
|
1173
1182
|
}
|
|
@@ -4310,6 +4319,19 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4310
4319
|
if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
|
|
4311
4320
|
_this.grid.refresh();
|
|
4312
4321
|
}
|
|
4322
|
+
if (args.action === 'filter') {
|
|
4323
|
+
if (_this.filterModule['currentFilterObject'] !== '' && _this.enableVirtualization && !_this.initialRender) {
|
|
4324
|
+
_this.expandAll();
|
|
4325
|
+
}
|
|
4326
|
+
}
|
|
4327
|
+
if (args.requestType === 'searching') {
|
|
4328
|
+
if (_this.searchSettings.key !== '' && _this.enableVirtualization && !_this.initialRender) {
|
|
4329
|
+
_this.expandAll();
|
|
4330
|
+
}
|
|
4331
|
+
}
|
|
4332
|
+
if (args.action === 'clearFilter' && _this.enableCollapseAll) {
|
|
4333
|
+
_this.collapseAll();
|
|
4334
|
+
}
|
|
4313
4335
|
if (_this.action === 'indenting' || _this.action === 'outdenting') {
|
|
4314
4336
|
_this.action = _this.action === 'indenting' ? 'indented' : 'outdented';
|
|
4315
4337
|
var selectedItem_1 = [_this.selectedRecords];
|
|
@@ -8885,10 +8907,6 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
8885
8907
|
}
|
|
8886
8908
|
}
|
|
8887
8909
|
else {
|
|
8888
|
-
if ((!this.parent.enableCollapseAll || !this.parent.initialRender && isNullOrUndefined(this.parent['dataResults']['result']))
|
|
8889
|
-
&& parent['expanded'] === false && this.parent.getVisibleRecords().indexOf(record) === -1) {
|
|
8890
|
-
this.parent.expandRow(this.parent.getRows()[parent['index']], parent);
|
|
8891
|
-
}
|
|
8892
8910
|
this.addParentRecord(parent);
|
|
8893
8911
|
}
|
|
8894
8912
|
}
|
|
@@ -9570,53 +9588,55 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
|
|
|
9570
9588
|
this.parent.off(toolbarClick, this.toolbarClickHandler);
|
|
9571
9589
|
};
|
|
9572
9590
|
Toolbar$$1.prototype.refreshToolbar = function (args) {
|
|
9573
|
-
var tObj = this.parent;
|
|
9574
|
-
var indentElement;
|
|
9575
|
-
var outdentElement;
|
|
9576
|
-
var indentID = tObj.element.id + '_gridcontrol_indent';
|
|
9577
|
-
var outdentID = tObj.element.id + '_gridcontrol_outdent';
|
|
9578
9591
|
var toolbarElement = this.parent.grid.toolbarModule.getToolbar();
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
if (
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9592
|
+
if (!isNullOrUndefined(toolbarElement)) {
|
|
9593
|
+
var tObj = this.parent;
|
|
9594
|
+
var indentElement = void 0;
|
|
9595
|
+
var outdentElement = void 0;
|
|
9596
|
+
var indentID = tObj.element.id + '_gridcontrol_indent';
|
|
9597
|
+
var outdentID = tObj.element.id + '_gridcontrol_outdent';
|
|
9598
|
+
var indentEle = toolbarElement.querySelector('#' + indentID);
|
|
9599
|
+
var outdentEle = toolbarElement.querySelector('#' + outdentID);
|
|
9600
|
+
var row = args.row;
|
|
9601
|
+
var selectedrow = tObj.getSelectedRows()[0];
|
|
9602
|
+
if (!isNullOrUndefined(row[0])) {
|
|
9603
|
+
row = row[0];
|
|
9604
|
+
}
|
|
9605
|
+
row = (!isNullOrUndefined(selectedrow) && selectedrow.rowIndex !== row.rowIndex) ? selectedrow : row;
|
|
9606
|
+
if (indentEle !== null && outdentEle !== null) {
|
|
9607
|
+
indentElement = toolbarElement.querySelector('#' + indentID).parentElement;
|
|
9608
|
+
outdentElement = toolbarElement.querySelector('#' + outdentID).parentElement;
|
|
9609
|
+
if (row.rowIndex === 0 || tObj.getSelectedRowIndexes().length > 1) {
|
|
9610
|
+
indentElement.classList.add('e-hidden');
|
|
9611
|
+
outdentElement.classList.add('e-hidden');
|
|
9612
|
+
}
|
|
9613
|
+
else if (args['name'] !== 'rowDeselected' || (!isNullOrUndefined(selectedrow) && tObj.grid.isCheckBoxSelection)) {
|
|
9614
|
+
var selectedItem = tObj.getCurrentViewRecords()[row.rowIndex];
|
|
9615
|
+
if (!isNullOrUndefined(selectedItem)) {
|
|
9616
|
+
if ((selectedItem.level > tObj.getCurrentViewRecords()[row.rowIndex - 1].level)) {
|
|
9617
|
+
indentElement.classList.add('e-hidden');
|
|
9618
|
+
}
|
|
9619
|
+
else {
|
|
9620
|
+
indentElement.classList.remove('e-hidden');
|
|
9621
|
+
}
|
|
9622
|
+
if (selectedItem.level === tObj.getCurrentViewRecords()[row.rowIndex - 1].level) {
|
|
9623
|
+
indentElement.classList.remove('e-hidden');
|
|
9624
|
+
}
|
|
9625
|
+
if (selectedItem.level === 0) {
|
|
9626
|
+
outdentElement.classList.add('e-hidden');
|
|
9627
|
+
}
|
|
9628
|
+
if (selectedItem.level !== 0) {
|
|
9629
|
+
outdentElement.classList.remove('e-hidden');
|
|
9630
|
+
}
|
|
9602
9631
|
}
|
|
9603
|
-
|
|
9604
|
-
|
|
9632
|
+
}
|
|
9633
|
+
if (args['name'] === 'rowDeselected' && isNullOrUndefined(selectedrow) && !tObj.grid.isCheckBoxSelection) {
|
|
9634
|
+
if (this.parent.toolbar['includes']('Indent')) {
|
|
9635
|
+
indentElement.classList.add('e-hidden');
|
|
9605
9636
|
}
|
|
9606
|
-
if (
|
|
9637
|
+
if (this.parent.toolbar['includes']('Outdent')) {
|
|
9607
9638
|
outdentElement.classList.add('e-hidden');
|
|
9608
9639
|
}
|
|
9609
|
-
if (selectedItem.level !== 0) {
|
|
9610
|
-
outdentElement.classList.remove('e-hidden');
|
|
9611
|
-
}
|
|
9612
|
-
}
|
|
9613
|
-
}
|
|
9614
|
-
if (args['name'] === 'rowDeselected' && isNullOrUndefined(selectedrow) && !tObj.grid.isCheckBoxSelection) {
|
|
9615
|
-
if (this.parent.toolbar['includes']('Indent')) {
|
|
9616
|
-
indentElement.classList.add('e-hidden');
|
|
9617
|
-
}
|
|
9618
|
-
if (this.parent.toolbar['includes']('Outdent')) {
|
|
9619
|
-
outdentElement.classList.add('e-hidden');
|
|
9620
9640
|
}
|
|
9621
9641
|
}
|
|
9622
9642
|
}
|