@syncfusion/ej2-treegrid 33.1.44 → 33.1.46
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/dist/ej2-treegrid.min.js +2 -2
- 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 +50 -6
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +54 -6
- 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 +4 -4
- package/src/treegrid/actions/batch-edit.js +1 -1
- package/src/treegrid/actions/edit.js +3 -0
- package/src/treegrid/actions/filter.js +20 -0
- package/src/treegrid/actions/rowdragdrop.js +9 -2
- package/src/treegrid/actions/virtual-scroll.js +2 -1
- package/src/treegrid/base/treegrid.js +5 -2
- package/src/treegrid/renderer/render.js +15 -0
|
@@ -2019,6 +2019,16 @@ class Render {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
const data = args.data;
|
|
2021
2021
|
const parentData = data.parentItem;
|
|
2022
|
+
if (!isNullOrUndefined(parentData) && data.isCollapsedChild && !isNullOrUndefined(args.row)) {
|
|
2023
|
+
this.parent['toggleRowVisibility'](args.row, 'e-childrow-hidden');
|
|
2024
|
+
const rowsObj = this.parent.grid.getRowsObject();
|
|
2025
|
+
if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
|
|
2026
|
+
const row = rowsObj.filter((e) => e.uid === args.row.getAttribute('data-uid'))[0];
|
|
2027
|
+
if (row) {
|
|
2028
|
+
row.visible = false;
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2022
2032
|
if (!isNullOrUndefined(data.parentItem) && !isFilterChildHierarchy(this.parent) &&
|
|
2023
2033
|
(!(this.parent.allowPaging && !(this.parent.pageSettings.pageSizeMode === 'Root')) ||
|
|
2024
2034
|
(isRemoteData(this.parent) && !isOffline(this.parent)))) {
|
|
@@ -2047,6 +2057,11 @@ class Render {
|
|
|
2047
2057
|
const summaryRow = getObject('isSummaryRow', args.data);
|
|
2048
2058
|
if (summaryRow) {
|
|
2049
2059
|
addClass([args.row], 'e-summaryrow');
|
|
2060
|
+
const isDragandDropCell = args.row.querySelector('.e-rowdragdrop') || args.row.querySelector('.e-rowdragdrop.e-dragging');
|
|
2061
|
+
if (isDragandDropCell) {
|
|
2062
|
+
args.row.cells[0].className = 'e-rowcell e-summarycell';
|
|
2063
|
+
args.row.cells[0].innerHTML = '';
|
|
2064
|
+
}
|
|
2050
2065
|
}
|
|
2051
2066
|
if (!isNullOrUndefined(args.row)) {
|
|
2052
2067
|
if (args.row.querySelector('.e-treegridexpand')) {
|
|
@@ -6837,7 +6852,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6837
6852
|
let temp;
|
|
6838
6853
|
let field;
|
|
6839
6854
|
const gridColumns = isNullOrUndefined(column) ? this.grid.getColumns() : column;
|
|
6840
|
-
if (this.treeColumnIndex !== -1 && this.columnModel[this.treeColumnIndex] &&
|
|
6855
|
+
if (this.treeColumnIndex !== -1 && !isNullOrUndefined(this.columnModel) && this.columnModel[this.treeColumnIndex] &&
|
|
6841
6856
|
!isNullOrUndefined(this.columnModel[this.treeColumnIndex].template)) {
|
|
6842
6857
|
temp = this.columnModel[this.treeColumnIndex].template;
|
|
6843
6858
|
field = this.columnModel[this.treeColumnIndex].field;
|
|
@@ -8245,7 +8260,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
8245
8260
|
}
|
|
8246
8261
|
partialFilterUpdate(args) {
|
|
8247
8262
|
const gridFiltered = args.gridFiltered;
|
|
8248
|
-
this.
|
|
8263
|
+
if ((this.allowFiltering && this.filterModule && this.grid.filterSettings.columns.length) ||
|
|
8264
|
+
(this.grid.searchSettings.key.length > 0)) {
|
|
8265
|
+
this.notify('updateFilterRecs', { data: gridFiltered });
|
|
8266
|
+
}
|
|
8249
8267
|
}
|
|
8250
8268
|
/**
|
|
8251
8269
|
* Filters the TreeGrid rows based on a specified column and filter criteria.
|
|
@@ -9725,8 +9743,10 @@ class RowDD {
|
|
|
9725
9743
|
const record = this.getChildrecordsByParentID(droppedRecord.parentUniqueID)[0];
|
|
9726
9744
|
const childRecords = record.childRecords;
|
|
9727
9745
|
for (let i = 0; i < childRecords.length; i++) {
|
|
9728
|
-
|
|
9729
|
-
|
|
9746
|
+
if (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].taskData)) {
|
|
9747
|
+
droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
|
|
9748
|
+
= childRecords[parseInt(i.toString(), 10)].taskData;
|
|
9749
|
+
}
|
|
9730
9750
|
}
|
|
9731
9751
|
}
|
|
9732
9752
|
}
|
|
@@ -10310,6 +10330,11 @@ class RowDD {
|
|
|
10310
10330
|
* @returns {void} This function does not return a value.
|
|
10311
10331
|
*/
|
|
10312
10332
|
rowDropped(args) {
|
|
10333
|
+
if (!isNullOrUndefined(this.parent.aggregates[0]) && this.parent.aggregates[0].showChildSummary) {
|
|
10334
|
+
const records = this.parent.grid.getCurrentViewRecords();
|
|
10335
|
+
args.fromIndex = records[args.fromIndex].index;
|
|
10336
|
+
args.dropIndex = records[args.dropIndex].index;
|
|
10337
|
+
}
|
|
10313
10338
|
const tObj = this.parent;
|
|
10314
10339
|
const parentItem = 'parentItem';
|
|
10315
10340
|
if (!tObj.rowDropSettings.targetID) {
|
|
@@ -11315,6 +11340,21 @@ class Filter {
|
|
|
11315
11340
|
if (this.flatFilteredData.length > 0 && this.isHierarchyFilter) {
|
|
11316
11341
|
this.updateFilterLevel();
|
|
11317
11342
|
}
|
|
11343
|
+
for (let i = 0; i < this.filteredResult.length; i++) {
|
|
11344
|
+
const record = this.filteredResult[parseInt(i.toString(), 10)];
|
|
11345
|
+
if (!isNullOrUndefined(record.parentItem)) {
|
|
11346
|
+
const parentUID = record.parentItem.uniqueID;
|
|
11347
|
+
const parentPresent = this.filteredResult.some((r) => {
|
|
11348
|
+
return !isNullOrUndefined(r.uniqueID) && r.uniqueID === parentUID;
|
|
11349
|
+
});
|
|
11350
|
+
if (parentPresent) {
|
|
11351
|
+
record.isCollapsedChild = !getExpandStatus(this.parent, record, this.parent.parentData);
|
|
11352
|
+
}
|
|
11353
|
+
else {
|
|
11354
|
+
record.isCollapsedChild = false;
|
|
11355
|
+
}
|
|
11356
|
+
}
|
|
11357
|
+
}
|
|
11318
11358
|
this.parent.notify('updateAction', { result: this.filteredResult });
|
|
11319
11359
|
}
|
|
11320
11360
|
updateParentFilteredRecord(record) {
|
|
@@ -13006,7 +13046,7 @@ class BatchEdit {
|
|
|
13006
13046
|
added.childRecords = [];
|
|
13007
13047
|
this.batchRecords.splice(added.index, 0, added);
|
|
13008
13048
|
this.currentViewRecords.splice(added.index, 0, added);
|
|
13009
|
-
if (currentDataIndex) {
|
|
13049
|
+
if (currentDataIndex > -1) {
|
|
13010
13050
|
indexvalue = currentDataIndex;
|
|
13011
13051
|
}
|
|
13012
13052
|
else {
|
|
@@ -13632,6 +13672,9 @@ class Edit {
|
|
|
13632
13672
|
}
|
|
13633
13673
|
}
|
|
13634
13674
|
}
|
|
13675
|
+
if (eventName === 'actionComplete' && eventArgs.requestType === 'save') {
|
|
13676
|
+
this.addRowRecord = null;
|
|
13677
|
+
}
|
|
13635
13678
|
if (this.parent.enableInfiniteScrolling && eventName === 'actionComplete') {
|
|
13636
13679
|
this.infiniteAddAction(eventArgs);
|
|
13637
13680
|
}
|
|
@@ -15998,7 +16041,8 @@ class VirtualScroll {
|
|
|
15998
16041
|
const dm = new DataManager(pageingDetails.result);
|
|
15999
16042
|
const expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
|
|
16000
16043
|
const parents = dm.executeLocal(new Query().where(expanded));
|
|
16001
|
-
const isFiltering = pageingDetails.actionArgs.requestType === 'filtering'
|
|
16044
|
+
const isFiltering = (pageingDetails.actionArgs.requestType === 'filtering' && (pageingDetails.actionArgs.action !== 'clear-filter' && pageingDetails.actionArgs.action !== 'clearFilter')) ||
|
|
16045
|
+
(!isNullOrUndefined(this.parent['filterModule']) && (this.parent['filterModule'].filteredResult && this.parent['filterModule'].filteredResult.length > 0));
|
|
16002
16046
|
const isFlatHierarchy = this.parent.filterSettings.hierarchyMode === 'Child' ||
|
|
16003
16047
|
this.parent.filterSettings.hierarchyMode === 'None';
|
|
16004
16048
|
const visualData = isFiltering && isFlatHierarchy
|