@syncfusion/ej2-treegrid 20.4.40 → 20.4.44
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 +8 -1
- package/README.md +1 -1
- 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 +22 -15
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +21 -14
- 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 +9 -9
- package/src/treegrid/base/data.js +4 -4
- package/src/treegrid/base/treegrid-model.d.ts +1 -1
- package/src/treegrid/base/treegrid.js +16 -9
- package/src/treegrid/models/loading-indicator-model.d.ts +2 -1
- package/src/treegrid/models/loading-indicator.d.ts +1 -0
- package/src/treegrid/renderer/render.js +1 -1
|
@@ -1719,7 +1719,7 @@ class Render {
|
|
|
1719
1719
|
const portals = 'portals';
|
|
1720
1720
|
const renderReactTemplates = 'renderReactTemplates';
|
|
1721
1721
|
if (this.parent.isReact && typeof (args.column.template) !== 'string') {
|
|
1722
|
-
args.column[`${templateFn}`](args.data, this.parent, '
|
|
1722
|
+
args.column[`${templateFn}`](args.data, this.parent, 'columnTemplate', tempID, null, null, cellElement);
|
|
1723
1723
|
if (isNullOrUndefined(this.parent.grid[`${portals}`])) {
|
|
1724
1724
|
this.parent.grid[`${portals}`] = this.parent[`${portals}`];
|
|
1725
1725
|
}
|
|
@@ -2004,7 +2004,7 @@ class DataManipulation {
|
|
|
2004
2004
|
if (isRemoteData(this.parent) && this.parent.enableVirtualization) {
|
|
2005
2005
|
const childRecords = [];
|
|
2006
2006
|
const parent = this.parent;
|
|
2007
|
-
records.filter(
|
|
2007
|
+
records.filter((e) => {
|
|
2008
2008
|
if (e[`${parent.parentIdMapping}`] === records[parseInt(rec.toString(), 10)][`${parent.idMapping}`]) {
|
|
2009
2009
|
childRecords.push(e);
|
|
2010
2010
|
}
|
|
@@ -2055,7 +2055,7 @@ class DataManipulation {
|
|
|
2055
2055
|
&& this.parent.grid.aggregates.length && this.parent.grid.sortSettings.columns.length === 0
|
|
2056
2056
|
&& this.parent.grid.filterSettings.columns.length === 0 && !this.parent.grid.searchSettings.key.length) {
|
|
2057
2057
|
const query = 'query';
|
|
2058
|
-
const summaryQuery = args[`${query}`].queries.filter((q) =>
|
|
2058
|
+
const summaryQuery = args[`${query}`].queries.filter((q) => q.fn === 'onAggregates');
|
|
2059
2059
|
args.result = this.parent.summaryModule.calculateSummaryValue(summaryQuery, this.parent.flatData, true);
|
|
2060
2060
|
}
|
|
2061
2061
|
this.parent.notify('updateResults', args);
|
|
@@ -2119,13 +2119,13 @@ class DataManipulation {
|
|
|
2119
2119
|
qry.isCountRequired = true;
|
|
2120
2120
|
if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
|
|
2121
2121
|
qry.take(this.parent.pageSettings.pageSize);
|
|
2122
|
-
|
|
2122
|
+
const expandDetail = [];
|
|
2123
2123
|
expandDetail.push('ExpandingAction', rowDetails.record[this.parent.idMapping]);
|
|
2124
2124
|
qry.expand(expandDetail);
|
|
2125
2125
|
}
|
|
2126
2126
|
else if (this.parent.enableVirtualization && rowDetails.action === 'collapse') {
|
|
2127
2127
|
qry.take(this.parent.grid.pageSettings.pageSize);
|
|
2128
|
-
|
|
2128
|
+
const expandDetail = [];
|
|
2129
2129
|
expandDetail.push('CollapsingAction', rowDetails.record[this.parent.idMapping]);
|
|
2130
2130
|
qry.expand(expandDetail);
|
|
2131
2131
|
}
|
|
@@ -4640,7 +4640,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4640
4640
|
}
|
|
4641
4641
|
let treeGridColumn;
|
|
4642
4642
|
let gridColumn;
|
|
4643
|
-
if (this.columnModel.length
|
|
4643
|
+
if (this.columnModel.length === 0) {
|
|
4644
4644
|
index = index === 0 ? -1 : index;
|
|
4645
4645
|
}
|
|
4646
4646
|
const gridColumnCollection = [];
|
|
@@ -6129,6 +6129,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6129
6129
|
this.localExpand(action, row, record);
|
|
6130
6130
|
}
|
|
6131
6131
|
}
|
|
6132
|
+
if (isCountRequired(this) && action === 'expand') {
|
|
6133
|
+
this.dataResults.result = this.getCurrentViewRecords();
|
|
6134
|
+
}
|
|
6132
6135
|
if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
|
|
6133
6136
|
targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');
|
|
6134
6137
|
targetEle.closest('.e-treerowcell').removeAttribute('aria-selected');
|
|
@@ -6305,27 +6308,29 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6305
6308
|
if (freeze) {
|
|
6306
6309
|
freezeRightRows = this.getFrozenRightRows().filter((r) => r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1)));
|
|
6307
6310
|
}
|
|
6308
|
-
|
|
6311
|
+
const gridRowsObject = this.grid.getRowsObject();
|
|
6309
6312
|
const currentViewData = this.getCurrentViewRecords();
|
|
6310
6313
|
const currentRecord = currentViewData.filter((e) => {
|
|
6311
6314
|
return e.uniqueID === record.uniqueID;
|
|
6312
6315
|
});
|
|
6313
6316
|
const currentIndex = currentViewData.indexOf(currentRecord[0]);
|
|
6314
|
-
if (!isNullOrUndefined(gridRowsObject[currentIndex
|
|
6315
|
-
gridRowsObject[currentIndex].visible
|
|
6317
|
+
if (!isNullOrUndefined(gridRowsObject[parseInt(currentIndex.toString(), 10)].visible) &&
|
|
6318
|
+
gridRowsObject[parseInt(currentIndex.toString(), 10)].visible !== false) {
|
|
6319
|
+
gridRowsObject[parseInt(currentIndex.toString(), 10)].visible = true;
|
|
6316
6320
|
}
|
|
6317
6321
|
const detailrows = gridRows.filter((r) => r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1)));
|
|
6318
6322
|
for (let i = 0; i < rows.length; i++) {
|
|
6319
6323
|
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)])) {
|
|
6320
6324
|
rows[parseInt(i.toString(), 10)].style.display = displayAction;
|
|
6321
6325
|
}
|
|
6322
|
-
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6323
|
-
|
|
6326
|
+
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6327
|
+
|| this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
6328
|
+
gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
|
|
6324
6329
|
const parentRecord = currentViewData.filter((e) => {
|
|
6325
6330
|
return e.uniqueID === currentRecord[0].parentUniqueID;
|
|
6326
6331
|
});
|
|
6327
6332
|
if (!isNullOrUndefined(parentRecord[0]) && gridRows[currentViewData.indexOf(parentRecord[0])].getElementsByClassName('e-treegridcollapse').length) {
|
|
6328
|
-
gridRowsObject[currentIndex].visible = false;
|
|
6333
|
+
gridRowsObject[parseInt(currentIndex.toString(), 10)].visible = false;
|
|
6329
6334
|
}
|
|
6330
6335
|
}
|
|
6331
6336
|
if (!isNullOrUndefined(movableRows)) {
|
|
@@ -6344,12 +6349,14 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6344
6349
|
}
|
|
6345
6350
|
}
|
|
6346
6351
|
for (let i = 0; i < detailrows.length; i++) {
|
|
6347
|
-
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6348
|
-
|
|
6352
|
+
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6353
|
+
|| this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
6354
|
+
gridRowsObject[detailrows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
|
|
6349
6355
|
detailrows[parseInt(i.toString(), 10)].style.display = displayAction;
|
|
6350
6356
|
}
|
|
6351
6357
|
}
|
|
6352
|
-
if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this)
|
|
6358
|
+
if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this)
|
|
6359
|
+
|| isCountRequired(this))) {
|
|
6353
6360
|
this.grid.notify('refresh-Expand-and-Collapse', { rows: this.grid.getRowsObject() });
|
|
6354
6361
|
}
|
|
6355
6362
|
}
|