@syncfusion/ej2-treegrid 20.4.42 → 20.4.48
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 +16 -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 +27 -15
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +26 -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 +21 -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 = [];
|
|
@@ -6128,6 +6128,14 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6128
6128
|
if ((!isCountRequired(this) || childRecords.length) || action === 'collapse') {
|
|
6129
6129
|
this.localExpand(action, row, record);
|
|
6130
6130
|
}
|
|
6131
|
+
const lastrowIdx = this.getVisibleRecords()[this.getVisibleRecords().length - 1]['index'];
|
|
6132
|
+
const lastRow = this.getRowByIndex(lastrowIdx);
|
|
6133
|
+
if (this.grid.getContentTable().clientHeight <= this.grid.getContent().clientHeight && !isNullOrUndefined(lastRow) && !lastRow.cells[0].classList.contains('e-lastrowcell')) {
|
|
6134
|
+
this.lastRowBorder(lastRow, true);
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
6137
|
+
if (isCountRequired(this) && action === 'expand') {
|
|
6138
|
+
this.dataResults.result = this.getCurrentViewRecords();
|
|
6131
6139
|
}
|
|
6132
6140
|
if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
|
|
6133
6141
|
targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');
|
|
@@ -6305,27 +6313,29 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6305
6313
|
if (freeze) {
|
|
6306
6314
|
freezeRightRows = this.getFrozenRightRows().filter((r) => r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1)));
|
|
6307
6315
|
}
|
|
6308
|
-
|
|
6316
|
+
const gridRowsObject = this.grid.getRowsObject();
|
|
6309
6317
|
const currentViewData = this.getCurrentViewRecords();
|
|
6310
6318
|
const currentRecord = currentViewData.filter((e) => {
|
|
6311
6319
|
return e.uniqueID === record.uniqueID;
|
|
6312
6320
|
});
|
|
6313
6321
|
const currentIndex = currentViewData.indexOf(currentRecord[0]);
|
|
6314
|
-
if (!isNullOrUndefined(gridRowsObject[currentIndex
|
|
6315
|
-
gridRowsObject[currentIndex].visible
|
|
6322
|
+
if (!isNullOrUndefined(gridRowsObject[parseInt(currentIndex.toString(), 10)].visible) &&
|
|
6323
|
+
gridRowsObject[parseInt(currentIndex.toString(), 10)].visible !== false) {
|
|
6324
|
+
gridRowsObject[parseInt(currentIndex.toString(), 10)].visible = true;
|
|
6316
6325
|
}
|
|
6317
6326
|
const detailrows = gridRows.filter((r) => r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1)));
|
|
6318
6327
|
for (let i = 0; i < rows.length; i++) {
|
|
6319
6328
|
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)])) {
|
|
6320
6329
|
rows[parseInt(i.toString(), 10)].style.display = displayAction;
|
|
6321
6330
|
}
|
|
6322
|
-
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6323
|
-
|
|
6331
|
+
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6332
|
+
|| this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
6333
|
+
gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
|
|
6324
6334
|
const parentRecord = currentViewData.filter((e) => {
|
|
6325
6335
|
return e.uniqueID === currentRecord[0].parentUniqueID;
|
|
6326
6336
|
});
|
|
6327
6337
|
if (!isNullOrUndefined(parentRecord[0]) && gridRows[currentViewData.indexOf(parentRecord[0])].getElementsByClassName('e-treegridcollapse').length) {
|
|
6328
|
-
gridRowsObject[currentIndex].visible = false;
|
|
6338
|
+
gridRowsObject[parseInt(currentIndex.toString(), 10)].visible = false;
|
|
6329
6339
|
}
|
|
6330
6340
|
}
|
|
6331
6341
|
if (!isNullOrUndefined(movableRows)) {
|
|
@@ -6344,12 +6354,14 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6344
6354
|
}
|
|
6345
6355
|
}
|
|
6346
6356
|
for (let i = 0; i < detailrows.length; i++) {
|
|
6347
|
-
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6348
|
-
|
|
6357
|
+
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
6358
|
+
|| this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
6359
|
+
gridRowsObject[detailrows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
|
|
6349
6360
|
detailrows[parseInt(i.toString(), 10)].style.display = displayAction;
|
|
6350
6361
|
}
|
|
6351
6362
|
}
|
|
6352
|
-
if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this)
|
|
6363
|
+
if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this)
|
|
6364
|
+
|| isCountRequired(this))) {
|
|
6353
6365
|
this.grid.notify('refresh-Expand-and-Collapse', { rows: this.grid.getRowsObject() });
|
|
6354
6366
|
}
|
|
6355
6367
|
}
|