@syncfusion/ej2-treegrid 26.2.14 → 27.1.50
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 +87 -121
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +87 -121
- 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 +10 -10
- package/src/treegrid/actions/batch-edit.js +6 -2
- package/src/treegrid/actions/edit.js +5 -4
- package/src/treegrid/actions/excel-export.js +3 -1
- package/src/treegrid/actions/virtual-scroll.d.ts +2 -0
- package/src/treegrid/actions/virtual-scroll.js +7 -1
- package/src/treegrid/base/data.js +27 -28
- package/src/treegrid/base/treegrid-model.d.ts +5 -2
- package/src/treegrid/base/treegrid.d.ts +7 -2
- package/src/treegrid/base/treegrid.js +38 -84
- package/src/treegrid/renderer/render.js +1 -1
- package/styles/bootstrap-dark-lite.css +427 -0
- package/styles/bootstrap-dark-lite.scss +18 -0
- package/styles/bootstrap-dark.css +24 -71
- package/styles/bootstrap-dark.scss +1 -0
- package/styles/bootstrap-lite.css +430 -0
- package/styles/bootstrap-lite.scss +18 -0
- package/styles/bootstrap.css +27 -74
- package/styles/bootstrap.scss +1 -0
- package/styles/bootstrap4-lite.css +463 -0
- package/styles/bootstrap4-lite.scss +18 -0
- package/styles/bootstrap4.css +24 -89
- package/styles/bootstrap4.scss +1 -0
- package/styles/bootstrap5-dark-lite.css +466 -0
- package/styles/bootstrap5-dark-lite.scss +18 -0
- package/styles/bootstrap5-dark.css +24 -75
- package/styles/bootstrap5-dark.scss +1 -0
- package/styles/bootstrap5-lite.css +466 -0
- package/styles/bootstrap5-lite.scss +18 -0
- package/styles/bootstrap5.3-lite.css +470 -0
- package/styles/bootstrap5.3-lite.scss +18 -0
- package/styles/bootstrap5.3.css +490 -0
- package/styles/bootstrap5.3.scss +19 -0
- package/styles/bootstrap5.css +24 -75
- package/styles/bootstrap5.scss +1 -0
- package/styles/fabric-dark-lite.css +406 -0
- package/styles/fabric-dark-lite.scss +18 -0
- package/styles/fabric-dark.css +27 -73
- package/styles/fabric-dark.scss +1 -0
- package/styles/fabric-lite.css +406 -0
- package/styles/fabric-lite.scss +18 -0
- package/styles/fabric.css +27 -66
- package/styles/fabric.scss +1 -0
- package/styles/fluent-dark-lite.css +469 -0
- package/styles/fluent-dark-lite.scss +18 -0
- package/styles/fluent-dark.css +31 -69
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent-lite.css +469 -0
- package/styles/fluent-lite.scss +18 -0
- package/styles/fluent.css +31 -69
- package/styles/fluent.scss +1 -0
- package/styles/fluent2-lite.css +657 -0
- package/styles/fluent2-lite.scss +18 -0
- package/styles/fluent2.css +50 -62
- package/styles/fluent2.scss +1 -0
- package/styles/highcontrast-light-lite.css +412 -0
- package/styles/highcontrast-light-lite.scss +18 -0
- package/styles/highcontrast-light.css +24 -58
- package/styles/highcontrast-light.scss +1 -0
- package/styles/highcontrast-lite.css +419 -0
- package/styles/highcontrast-lite.scss +18 -0
- package/styles/highcontrast.css +31 -65
- package/styles/highcontrast.scss +1 -0
- package/styles/material-dark-lite.css +488 -0
- package/styles/material-dark-lite.scss +18 -0
- package/styles/material-dark.css +24 -55
- package/styles/material-dark.scss +1 -0
- package/styles/material-lite.css +512 -0
- package/styles/material-lite.scss +18 -0
- package/styles/material.css +24 -76
- package/styles/material.scss +1 -0
- package/styles/material3-dark-lite.css +499 -0
- package/styles/material3-dark-lite.scss +18 -0
- package/styles/material3-dark.css +24 -80
- package/styles/material3-dark.scss +1 -0
- package/styles/material3-lite.css +501 -0
- package/styles/material3-lite.scss +18 -0
- package/styles/material3.css +24 -80
- package/styles/material3.scss +1 -0
- package/styles/tailwind-dark-lite.css +439 -0
- package/styles/tailwind-dark-lite.scss +18 -0
- package/styles/tailwind-dark.css +24 -56
- package/styles/tailwind-dark.scss +1 -0
- package/styles/tailwind-lite.css +439 -0
- package/styles/tailwind-lite.scss +18 -0
- package/styles/tailwind.css +24 -56
- package/styles/tailwind.scss +1 -0
- package/styles/treegrid/_bigger.scss +62 -0
- package/styles/treegrid/_bootstrap5.3-definition.scss +5 -5
- package/styles/treegrid/_fluent2-definition.scss +3 -3
- package/styles/treegrid/_layout.scss +19 -52
- package/styles/treegrid/bootstrap-dark.css +24 -71
- package/styles/treegrid/bootstrap-dark.scss +1 -0
- package/styles/treegrid/bootstrap.css +27 -74
- package/styles/treegrid/bootstrap.scss +1 -0
- package/styles/treegrid/bootstrap4.css +24 -89
- package/styles/treegrid/bootstrap4.scss +1 -0
- package/styles/treegrid/bootstrap5-dark.css +24 -75
- package/styles/treegrid/bootstrap5-dark.scss +1 -0
- package/styles/treegrid/bootstrap5.3.css +490 -0
- package/styles/treegrid/bootstrap5.3.scss +19 -0
- package/styles/treegrid/bootstrap5.css +24 -75
- package/styles/treegrid/bootstrap5.scss +1 -0
- package/styles/treegrid/fabric-dark.css +27 -73
- package/styles/treegrid/fabric-dark.scss +1 -0
- package/styles/treegrid/fabric.css +27 -66
- package/styles/treegrid/fabric.scss +1 -0
- package/styles/treegrid/fluent-dark.css +31 -69
- package/styles/treegrid/fluent-dark.scss +1 -0
- package/styles/treegrid/fluent.css +31 -69
- package/styles/treegrid/fluent.scss +1 -0
- package/styles/treegrid/fluent2.css +50 -62
- package/styles/treegrid/fluent2.scss +1 -0
- package/styles/treegrid/highcontrast-light.css +24 -58
- package/styles/treegrid/highcontrast-light.scss +1 -0
- package/styles/treegrid/highcontrast.css +31 -65
- package/styles/treegrid/highcontrast.scss +1 -0
- package/styles/treegrid/material-dark.css +24 -55
- package/styles/treegrid/material-dark.scss +1 -0
- package/styles/treegrid/material.css +24 -76
- package/styles/treegrid/material.scss +1 -0
- package/styles/treegrid/material3-dark.css +24 -80
- package/styles/treegrid/material3-dark.scss +1 -0
- package/styles/treegrid/material3.css +24 -80
- package/styles/treegrid/material3.scss +1 -0
- package/styles/treegrid/tailwind-dark.css +24 -56
- package/styles/treegrid/tailwind-dark.scss +1 -0
- package/styles/treegrid/tailwind.css +24 -56
- package/styles/treegrid/tailwind.scss +1 -0
|
@@ -1641,7 +1641,7 @@ class Render {
|
|
|
1641
1641
|
let iconRequired = !isNullOrUndefined(data.hasFilteredChildRecords)
|
|
1642
1642
|
? data.hasFilteredChildRecords : data.hasChildRecords;
|
|
1643
1643
|
if (iconRequired && !isNullOrUndefined(data.childRecords)) {
|
|
1644
|
-
if (this.parent['isFromGantt'] &&
|
|
1644
|
+
if (this.parent['isFromGantt'] && this.parent.loadChildOnDemand) {
|
|
1645
1645
|
iconRequired = data.hasChildRecords;
|
|
1646
1646
|
}
|
|
1647
1647
|
else {
|
|
@@ -2087,12 +2087,12 @@ class DataManipulation {
|
|
|
2087
2087
|
this.parent.query.expands = [];
|
|
2088
2088
|
}
|
|
2089
2089
|
if (!this.parent.hasChildMapping && !this.parentItems.length &&
|
|
2090
|
-
(
|
|
2090
|
+
(this.parent.loadChildOnDemand)) {
|
|
2091
2091
|
this.zerothLevelData = args;
|
|
2092
2092
|
setValue('cancel', true, args);
|
|
2093
2093
|
}
|
|
2094
2094
|
else {
|
|
2095
|
-
if (
|
|
2095
|
+
if (this.parent.loadChildOnDemand) {
|
|
2096
2096
|
for (let rec = 0; rec < records.length; rec++) {
|
|
2097
2097
|
if (isCountRequired(this.parent) && records[parseInt(rec.toString(), 10)].hasChildRecords &&
|
|
2098
2098
|
this.parent.initialRender) {
|
|
@@ -2133,22 +2133,22 @@ class DataManipulation {
|
|
|
2133
2133
|
else {
|
|
2134
2134
|
const dataResults = 'dataResults';
|
|
2135
2135
|
const expandRecord = 'expandRecord';
|
|
2136
|
-
if (!isNullOrUndefined(records) && !((this.parent.loadChildOnDemand) && isCountRequired(this.parent) && !isNullOrUndefined(this.parent[`${dataResults}`][`${expandRecord}`])) &&
|
|
2137
|
-
!(isRemoteData(this.parent) && this.parent.loadChildOnDemand && args[`${actionArgs}`].isExpandCollapse && this.parent.enableVirtualization)) {
|
|
2136
|
+
if (!isNullOrUndefined(records) && !((!this.parent.loadChildOnDemand) && isCountRequired(this.parent) && !isNullOrUndefined(this.parent[`${dataResults}`][`${expandRecord}`])) &&
|
|
2137
|
+
!(isRemoteData(this.parent) && !this.parent.loadChildOnDemand && args[`${actionArgs}`].isExpandCollapse && this.parent.enableVirtualization)) {
|
|
2138
2138
|
this.convertToFlatData(records);
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
2141
2141
|
}
|
|
2142
|
-
if (isRemoteData(this.parent) && this.parent.loadChildOnDemand && args[`${actionArgs}`].isExpandCollapse && this.parent.enableVirtualization) {
|
|
2142
|
+
if (isRemoteData(this.parent) && !this.parent.loadChildOnDemand && args[`${actionArgs}`].isExpandCollapse && this.parent.enableVirtualization) {
|
|
2143
2143
|
args.result = records;
|
|
2144
2144
|
}
|
|
2145
|
-
else if (isRemoteData(this.parent) && this.parent.enableVirtualization &&
|
|
2145
|
+
else if (isRemoteData(this.parent) && this.parent.enableVirtualization && this.parent.loadChildOnDemand) {
|
|
2146
2146
|
args.result = records;
|
|
2147
2147
|
}
|
|
2148
2148
|
else {
|
|
2149
|
-
args.result = this.parent.loadChildOnDemand ? this.parent.flatData : records;
|
|
2149
|
+
args.result = !this.parent.loadChildOnDemand ? this.parent.flatData : records;
|
|
2150
2150
|
}
|
|
2151
|
-
if (isRemoteData(this.parent) && this.parent.enableVirtualization && this.parent.loadChildOnDemand
|
|
2151
|
+
if (isRemoteData(this.parent) && this.parent.enableVirtualization && !this.parent.loadChildOnDemand
|
|
2152
2152
|
&& this.parent.grid.aggregates.length && this.parent.grid.sortSettings.columns.length === 0
|
|
2153
2153
|
&& this.parent.grid.filterSettings.columns.length === 0 && !this.parent.grid.searchSettings.key.length) {
|
|
2154
2154
|
const query = 'query';
|
|
@@ -2182,7 +2182,7 @@ class DataManipulation {
|
|
|
2182
2182
|
}
|
|
2183
2183
|
for (let i = 0; i < rowDetails.rows.length; i++) {
|
|
2184
2184
|
rowDetails.rows[parseInt(i.toString(), 10)].style.display = 'table-row';
|
|
2185
|
-
if (this.parent.loadChildOnDemand) {
|
|
2185
|
+
if (!this.parent.loadChildOnDemand) {
|
|
2186
2186
|
const targetEle = rowDetails.rows[parseInt(i.toString(), 10)].getElementsByClassName('e-treegridcollapse')[0];
|
|
2187
2187
|
childRecord = this.parent.rowTemplate ?
|
|
2188
2188
|
this.parent.grid.getCurrentViewRecords()[rowDetails.rows[parseInt(i.toString(), 10)].rowIndex] :
|
|
@@ -2243,7 +2243,7 @@ class DataManipulation {
|
|
|
2243
2243
|
let datas = this.parent.grid.currentViewData.slice();
|
|
2244
2244
|
let inx;
|
|
2245
2245
|
const idMapping = this.parent.idMapping;
|
|
2246
|
-
if (this.parent['isGantt'] &&
|
|
2246
|
+
if (this.parent['isGantt'] && this.parent.loadChildOnDemand && this.parent.hasChildMapping) {
|
|
2247
2247
|
for (let i = 0; i < this.parent.grid.currentViewData.length; i++) {
|
|
2248
2248
|
if (rowDetails.record[idMapping] === this.parent.grid.currentViewData[i][idMapping]) {
|
|
2249
2249
|
inx = i;
|
|
@@ -2367,7 +2367,7 @@ class DataManipulation {
|
|
|
2367
2367
|
this.parentItems.indexOf(result[parseInt(r.toString(), 10)][`${this.parent.idMapping}`]) !== -1)
|
|
2368
2368
|
&& !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
|
|
2369
2369
|
result[parseInt(r.toString(), 10)].hasChildRecords = true;
|
|
2370
|
-
if (this.parent.enableVirtualization && this.parent.loadChildOnDemand) {
|
|
2370
|
+
if (this.parent.enableVirtualization && !this.parent.loadChildOnDemand) {
|
|
2371
2371
|
for (let i = 0; i < this.parent[`${remoteCollapsedData}`].length; i++) {
|
|
2372
2372
|
if (result[parseInt(r.toString(), 10)][`${this.parent.idMapping}`] === this.parent[`${remoteCollapsedData}`][parseInt(i.toString(), 10)][`${this.parent.idMapping}`]) {
|
|
2373
2373
|
result[parseInt(r.toString(), 10)].expanded = this.parent[`${remoteCollapsedData}`][parseInt(i.toString(), 10)]['expanded'];
|
|
@@ -2401,7 +2401,7 @@ class DataManipulation {
|
|
|
2401
2401
|
else if (this.parent.enableVirtualization && result[parseInt(r.toString(), 10)][`${this.parent.idMapping}`] === rowDetails.record[`${this.parent.idMapping}`] && rowDetails.action !== 'collapse') {
|
|
2402
2402
|
result[parseInt(r.toString(), 10)].expanded = true;
|
|
2403
2403
|
}
|
|
2404
|
-
else if (!(this.parent.enableVirtualization && this.parent.loadChildOnDemand)) {
|
|
2404
|
+
else if (!(this.parent.enableVirtualization && !this.parent.loadChildOnDemand)) {
|
|
2405
2405
|
result[parseInt(r.toString(), 10)].expanded = false;
|
|
2406
2406
|
}
|
|
2407
2407
|
}
|
|
@@ -2423,7 +2423,7 @@ class DataManipulation {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
}
|
|
2425
2425
|
if (rowDetails.action === 'remoteExpand' && this.parent.allowPaging && this.parent.pageSettings.pageSizeMode === 'All') {
|
|
2426
|
-
this.parent.grid.pageSettings.totalRecordsCount = this.parent.grid.
|
|
2426
|
+
this.parent.grid.pageSettings.totalRecordsCount = this.parent.grid.pageSettings.totalRecordsCount + result.length;
|
|
2427
2427
|
}
|
|
2428
2428
|
if (this.parent.enableVirtualization) {
|
|
2429
2429
|
this.parent.grid.pageSettings.totalRecordsCount = e.count;
|
|
@@ -2476,21 +2476,20 @@ class DataManipulation {
|
|
|
2476
2476
|
if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
|
|
2477
2477
|
currentData.index = this.storedIndex;
|
|
2478
2478
|
}
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
}
|
|
2479
|
+
const childMapping = currentData[this.parent.childMapping];
|
|
2480
|
+
const hasChildren = !isNullOrUndefined(childMapping) && childMapping.length > 0;
|
|
2481
|
+
const shouldCount = isCountRequired(this.parent);
|
|
2482
|
+
const hasChildMapping = currentData[this.parent.hasChildMapping];
|
|
2483
|
+
if ((hasChildren && !shouldCount) || (hasChildMapping && shouldCount)) {
|
|
2484
|
+
currentData.hasChildRecords = true;
|
|
2485
|
+
}
|
|
2486
|
+
else {
|
|
2487
|
+
currentData.hasChildRecords = false;
|
|
2488
|
+
}
|
|
2489
|
+
if ((!isNullOrUndefined(childMapping) && !shouldCount) ||
|
|
2490
|
+
(hasChildMapping) && shouldCount) {
|
|
2492
2491
|
if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
|
|
2493
|
-
&& isNullOrUndefined(
|
|
2492
|
+
&& isNullOrUndefined(childMapping)) {
|
|
2494
2493
|
currentData.expanded = false;
|
|
2495
2494
|
}
|
|
2496
2495
|
else {
|
|
@@ -2522,7 +2521,7 @@ class DataManipulation {
|
|
|
2522
2521
|
}
|
|
2523
2522
|
currentData.checkboxState = 'uncheck';
|
|
2524
2523
|
const remoteCollapsedData = 'remoteCollapsedData';
|
|
2525
|
-
if (this.parent.enableVirtualization && this.parent.loadChildOnDemand && isRemoteData(this.parent)
|
|
2524
|
+
if (this.parent.enableVirtualization && !this.parent.loadChildOnDemand && isRemoteData(this.parent)
|
|
2526
2525
|
&& !this.parent.initialRender) {
|
|
2527
2526
|
if (!currentData.hasChildRecords && isNullOrUndefined(currentData[`${this.parent.parentIdMapping}`])) {
|
|
2528
2527
|
currentData.hasChildRecords = true;
|
|
@@ -3449,6 +3448,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3449
3448
|
this.deletedRecords = 'deletedRecords';
|
|
3450
3449
|
this.addedRecords = 'addedRecords';
|
|
3451
3450
|
this.indentOutdentAction = 'indentOutdentAction';
|
|
3451
|
+
this.isFromChartSide = false;
|
|
3452
3452
|
this.modifiedRecords = [];
|
|
3453
3453
|
this.stackedHeader = false;
|
|
3454
3454
|
this.objectEqualityChecker = (old, current) => {
|
|
@@ -3677,10 +3677,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3677
3677
|
* @returns {void}
|
|
3678
3678
|
*/
|
|
3679
3679
|
sortByColumn(columnName, direction, isMultiSort) {
|
|
3680
|
-
if (isNullOrUndefined(columnName) && isNullOrUndefined(direction)) {
|
|
3681
|
-
const error = 'The provided value for the columnName and direction is undefined. Please ensure the columnName and direction contains string.';
|
|
3682
|
-
this.trigger(actionFailure, { error: error });
|
|
3683
|
-
}
|
|
3684
3680
|
if (this.sortModule) {
|
|
3685
3681
|
this.sortModule.sortColumn(columnName, direction, isMultiSort);
|
|
3686
3682
|
}
|
|
@@ -3741,10 +3737,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3741
3737
|
* @returns {void}
|
|
3742
3738
|
*/
|
|
3743
3739
|
reorderColumns(fromFName, toFName) {
|
|
3744
|
-
if (isNullOrUndefined(fromFName) && isNullOrUndefined(toFName)) {
|
|
3745
|
-
const error = 'The provided value for the fromFName and toFName is undefined. Please ensure the fromFName and toFName contains string.';
|
|
3746
|
-
this.trigger(actionFailure, { error: error });
|
|
3747
|
-
}
|
|
3748
3740
|
this.grid.reorderColumns(fromFName, toFName);
|
|
3749
3741
|
}
|
|
3750
3742
|
TreeGridLocale() {
|
|
@@ -3824,8 +3816,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3824
3816
|
if (summaryElement !== null) {
|
|
3825
3817
|
const cellIndex = target.cellIndex;
|
|
3826
3818
|
const row = summaryElement.children[parseInt(cellIndex.toString(), 10)];
|
|
3827
|
-
|
|
3828
|
-
|
|
3819
|
+
if (!isNullOrUndefined(row) && !this.grid.isEdit) {
|
|
3820
|
+
addClass([row], 'e-focused');
|
|
3821
|
+
addClass([row], 'e-focus');
|
|
3822
|
+
}
|
|
3829
3823
|
}
|
|
3830
3824
|
else {
|
|
3831
3825
|
this.clearSelection();
|
|
@@ -3852,8 +3846,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3852
3846
|
const cellIndex = target.cellIndex;
|
|
3853
3847
|
if (!isNullOrUndefined(cellIndex)) {
|
|
3854
3848
|
const row = summaryElement.children[parseInt(cellIndex.toString(), 10)];
|
|
3855
|
-
|
|
3856
|
-
|
|
3849
|
+
if (!isNullOrUndefined(row) && !this.grid.isEdit) {
|
|
3850
|
+
addClass([row], 'e-focused');
|
|
3851
|
+
addClass([row], 'e-focus');
|
|
3852
|
+
}
|
|
3857
3853
|
}
|
|
3858
3854
|
}
|
|
3859
3855
|
else {
|
|
@@ -3983,7 +3979,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3983
3979
|
name: 'Aggregate'
|
|
3984
3980
|
});
|
|
3985
3981
|
}
|
|
3986
|
-
if (this.
|
|
3982
|
+
if (this.resizeCheck()) {
|
|
3987
3983
|
modules.push({
|
|
3988
3984
|
member: 'resize', args: [this],
|
|
3989
3985
|
name: 'Resize'
|
|
@@ -4032,6 +4028,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4032
4028
|
this.extendRequiredModules(modules);
|
|
4033
4029
|
return modules;
|
|
4034
4030
|
}
|
|
4031
|
+
resizeCheck() {
|
|
4032
|
+
const columnMenu = this.showColumnMenu && (!this.columnMenuItems || this.columnMenuItems
|
|
4033
|
+
.filter((c) => c === 'AutoFit' || c === 'AutoFitAll').length) ? true : false;
|
|
4034
|
+
const contextMenu = this.contextMenuItems && this.contextMenuItems
|
|
4035
|
+
.filter((c) => c === 'AutoFit' || c === 'AutoFitAll').length ? true : false;
|
|
4036
|
+
return this.allowResizing || columnMenu || contextMenu;
|
|
4037
|
+
}
|
|
4035
4038
|
extendRequiredModules(modules) {
|
|
4036
4039
|
const IsRowDDInjected = this.injectedModules.filter((e) => {
|
|
4037
4040
|
return e.prototype.getModuleName() === 'rowDragAndDrop';
|
|
@@ -4231,9 +4234,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4231
4234
|
if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
|
|
4232
4235
|
failureCases.push('Virtual scrolling is not compatible with the detail template');
|
|
4233
4236
|
}
|
|
4234
|
-
if (this.stackedHeader && !isNullOrUndefined(this.detailTemplate)) {
|
|
4235
|
-
failureCases.push('Virtual scrolling is not compatible with the detail template');
|
|
4236
|
-
}
|
|
4237
4237
|
if ((this.frozenColumns > 0 || this.columnModel.filter((col) => col.isFrozen) || this.frozenRows > 0)
|
|
4238
4238
|
&& (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
|
|
4239
4239
|
failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
|
|
@@ -4406,7 +4406,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4406
4406
|
this.trigger(getObject('name', args), args);
|
|
4407
4407
|
}
|
|
4408
4408
|
IsExpandCollapseClicked(args) {
|
|
4409
|
-
if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
4409
|
+
if (!this.isFromChartSide && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
4410
4410
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
|
|
4411
4411
|
&& !this.selectionSettings.checkboxOnly) {
|
|
4412
4412
|
if ((!isNullOrUndefined(args.data) && args.data['hasChildRecords']) || (args.rowIndex !== -1 && isNullOrUndefined(args.data))) {
|
|
@@ -4428,9 +4428,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4428
4428
|
if (this.pageSettings.pageSizeMode === 'Root') {
|
|
4429
4429
|
this.grid.selectionModule['totalRecordsCount'] = this.grid.currentViewData.length;
|
|
4430
4430
|
}
|
|
4431
|
-
if (this.enableVirtualization && args.rowIndex === this.selectedRowIndex) {
|
|
4431
|
+
if (this.enableVirtualization && args.rowIndex === this.selectedRowIndex && !this.enablePersistence) {
|
|
4432
4432
|
args.cancel = true;
|
|
4433
4433
|
}
|
|
4434
|
+
if (!isNullOrUndefined(this.selectionSettings) && !this.selectionSettings.persistSelection &&
|
|
4435
|
+
this.enableVirtualization && args.rowIndex === this.selectedRowIndex && this.isGantt) {
|
|
4436
|
+
args.cancel = false;
|
|
4437
|
+
}
|
|
4434
4438
|
this.trigger(rowSelecting, args);
|
|
4435
4439
|
};
|
|
4436
4440
|
this.grid.rowDeselecting = (args) => {
|
|
@@ -5541,7 +5545,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5541
5545
|
}
|
|
5542
5546
|
if (((target.classList.contains('e-flmenu-cancelbtn') || target.classList.contains('e-flmenu-okbtn')
|
|
5543
5547
|
|| target.classList.contains('e-content') || target.classList.contains('e-rowcell'))
|
|
5544
|
-
&& !isNullOrUndefined(this.filterModule) && this.isReact)) {
|
|
5548
|
+
&& !isNullOrUndefined(this.grid.filterModule) && this.isReact)) {
|
|
5545
5549
|
if (!isNullOrUndefined(this.grid.filterModule['column'])) {
|
|
5546
5550
|
if (this.grid.filterModule['column'].filterTemplate) {
|
|
5547
5551
|
const elem = document.getElementById(this.grid.filterModule.filterModule['dlgObj'].element.id);
|
|
@@ -5721,10 +5725,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5721
5725
|
* @returns {void}
|
|
5722
5726
|
*/
|
|
5723
5727
|
deleteRow(tr) {
|
|
5724
|
-
if (isNullOrUndefined(tr)) {
|
|
5725
|
-
const error = 'The provided value for the tr is undefined. Please ensure the tr contains HTMLTableRowElement.';
|
|
5726
|
-
this.trigger(actionFailure, { error: error });
|
|
5727
|
-
}
|
|
5728
5728
|
if (this.grid.editModule) {
|
|
5729
5729
|
this.grid.editModule.deleteRow(tr);
|
|
5730
5730
|
}
|
|
@@ -5750,10 +5750,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5750
5750
|
this.grid.setCellValue(key, field, value);
|
|
5751
5751
|
const rowIndex = this.grid.getRowIndexByPrimaryKey(key);
|
|
5752
5752
|
const record = this.getCurrentViewRecords()[parseInt(rowIndex.toString(), 10)];
|
|
5753
|
-
if (isNullOrUndefined(record)) {
|
|
5754
|
-
const error = 'The provided value for the record is undefined. Please ensure the record contains ITreeData.';
|
|
5755
|
-
this.trigger(actionFailure, { error: error });
|
|
5756
|
-
}
|
|
5757
5753
|
editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
|
|
5758
5754
|
}
|
|
5759
5755
|
/**
|
|
@@ -5805,10 +5801,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5805
5801
|
* @returns {void}
|
|
5806
5802
|
*/
|
|
5807
5803
|
goToPage(pageNo) {
|
|
5808
|
-
if (isNullOrUndefined(pageNo)) {
|
|
5809
|
-
const error = 'The provided value for the pageNo is undefined. Please ensure the pageNo contains number.';
|
|
5810
|
-
this.trigger(actionFailure, { error: error });
|
|
5811
|
-
}
|
|
5812
5804
|
if (this.grid.pagerModule) {
|
|
5813
5805
|
this.grid.pagerModule.goToPage(pageNo);
|
|
5814
5806
|
}
|
|
@@ -5910,10 +5902,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5910
5902
|
* @returns {void}
|
|
5911
5903
|
*/
|
|
5912
5904
|
hideColumns(keys, hideBy) {
|
|
5913
|
-
if (isNullOrUndefined(keys)) {
|
|
5914
|
-
const error = 'The provided value for the keys is undefined. Please ensure the keys contains string.';
|
|
5915
|
-
this.trigger(actionFailure, { error: error });
|
|
5916
|
-
}
|
|
5917
5905
|
this.grid.hideColumns(keys, hideBy);
|
|
5918
5906
|
this.updateColumnModel();
|
|
5919
5907
|
}
|
|
@@ -6010,6 +5998,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6010
5998
|
if (this.grid.columns.length !== this.columnModel.length) {
|
|
6011
5999
|
this.stackedHeader = true;
|
|
6012
6000
|
}
|
|
6001
|
+
if (this.stackedHeader && !isNullOrUndefined(this.detailTemplate)) {
|
|
6002
|
+
const error = 'Stacked header is not compatible with the detail template';
|
|
6003
|
+
this.trigger(actionFailure, { error: error });
|
|
6004
|
+
}
|
|
6013
6005
|
if (this.stackedHeader && this.allowResizing && !isNullOrUndefined(this.columns)) {
|
|
6014
6006
|
this.updateColumnsWidth(this.columns);
|
|
6015
6007
|
}
|
|
@@ -6328,10 +6320,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6328
6320
|
*/
|
|
6329
6321
|
expandRow(row, record, key, level) {
|
|
6330
6322
|
this.isCollapseAll = false;
|
|
6331
|
-
if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key) && isNullOrUndefined(level)) {
|
|
6332
|
-
const error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
|
|
6333
|
-
this.trigger(actionFailure, { error: error });
|
|
6334
|
-
}
|
|
6335
6323
|
let parentRec = this.parentData;
|
|
6336
6324
|
if (!this.enableVirtualization) {
|
|
6337
6325
|
parentRec = this.flatData.filter((e) => {
|
|
@@ -6420,7 +6408,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6420
6408
|
return e.hasChildRecords;
|
|
6421
6409
|
});
|
|
6422
6410
|
}
|
|
6423
|
-
else if (isNullOrUndefined(record)
|
|
6411
|
+
else if (isNullOrUndefined(record)) {
|
|
6424
6412
|
if (this.detailTemplate) {
|
|
6425
6413
|
record = this.grid.getCurrentViewRecords()[row.getAttribute('data-rowindex')];
|
|
6426
6414
|
}
|
|
@@ -6453,10 +6441,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6453
6441
|
*/
|
|
6454
6442
|
collapseRow(row, record, key) {
|
|
6455
6443
|
this.isExpandAll = false;
|
|
6456
|
-
if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key)) {
|
|
6457
|
-
const error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
|
|
6458
|
-
this.trigger(actionFailure, { error: error });
|
|
6459
|
-
}
|
|
6460
6444
|
let parentRec = this.parentData;
|
|
6461
6445
|
if (!this.enableVirtualization) {
|
|
6462
6446
|
parentRec = this.flatData.filter((e) => {
|
|
@@ -6536,10 +6520,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6536
6520
|
* @returns {void}
|
|
6537
6521
|
*/
|
|
6538
6522
|
expandAtLevel(level) {
|
|
6539
|
-
if (isNullOrUndefined(level)) {
|
|
6540
|
-
const error = 'The provided value for the level is undefined. Please ensure the level contains number.';
|
|
6541
|
-
this.trigger(actionFailure, { error: error });
|
|
6542
|
-
}
|
|
6543
6523
|
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
|
|
6544
6524
|
const rec = this.grid.dataSource.filter((e) => {
|
|
6545
6525
|
if (e.hasChildRecords && e.level === level) {
|
|
@@ -6562,10 +6542,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6562
6542
|
* @returns {void}
|
|
6563
6543
|
*/
|
|
6564
6544
|
expandByKey(key) {
|
|
6565
|
-
if (isNullOrUndefined(key)) {
|
|
6566
|
-
const error = 'The provided value for the key is undefined. Please ensure the key contains number.';
|
|
6567
|
-
this.trigger(actionFailure, { error: error });
|
|
6568
|
-
}
|
|
6569
6545
|
this.expandCollapseActionByKey(key, 'Expand');
|
|
6570
6546
|
}
|
|
6571
6547
|
expandAction(record, key, level, isPaging = false) {
|
|
@@ -6618,10 +6594,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6618
6594
|
* @returns {void}
|
|
6619
6595
|
*/
|
|
6620
6596
|
collapseAtLevel(level) {
|
|
6621
|
-
if (isNullOrUndefined(level)) {
|
|
6622
|
-
const error = 'The provided value for the level is undefined. Please ensure the level contains number.';
|
|
6623
|
-
this.trigger(actionFailure, { error: error });
|
|
6624
|
-
}
|
|
6625
6597
|
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
|
|
6626
6598
|
const record = this.grid.dataSource.filter((e) => {
|
|
6627
6599
|
if (e.hasChildRecords && e.level === level) {
|
|
@@ -6644,10 +6616,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6644
6616
|
* @returns {void}
|
|
6645
6617
|
*/
|
|
6646
6618
|
collapseByKey(key) {
|
|
6647
|
-
if (isNullOrUndefined(key)) {
|
|
6648
|
-
const error = 'The provided value for the key is undefined. Please ensure the key contains number.';
|
|
6649
|
-
this.trigger(actionFailure, { error: error });
|
|
6650
|
-
}
|
|
6651
6619
|
this.expandCollapseActionByKey(key, 'Collapse');
|
|
6652
6620
|
}
|
|
6653
6621
|
expandCollapseActionByKey(key, action) {
|
|
@@ -6771,14 +6739,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6771
6739
|
}
|
|
6772
6740
|
expandCollapse(action, row, record, isChild) {
|
|
6773
6741
|
const expandingArgs = { row: row, data: record, childData: [], requestType: action };
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
return e.parentUniqueID === record.uniqueID;
|
|
6778
|
-
});
|
|
6779
|
-
}
|
|
6742
|
+
const childRecords = this.grid.currentViewData.filter((e) => {
|
|
6743
|
+
return e.parentUniqueID === record.uniqueID;
|
|
6744
|
+
});
|
|
6780
6745
|
let targetEle;
|
|
6781
|
-
if ((!isRemoteData(this) && action === 'expand' && this.isSelfReference && isCountRequired(this) && !childRecords.length) || (action === 'collapse' || (this.isExpandAll && this.loadChildOnDemand) && !isRemoteData(this) && this.isSelfReference && isCountRequired(this))) {
|
|
6746
|
+
if ((!isRemoteData(this) && action === 'expand' && this.isSelfReference && isCountRequired(this) && !childRecords.length) || (action === 'collapse' || (this.isExpandAll && !this.loadChildOnDemand) && !isRemoteData(this) && this.isSelfReference && isCountRequired(this))) {
|
|
6782
6747
|
this.updateChildOnDemand(expandingArgs);
|
|
6783
6748
|
}
|
|
6784
6749
|
let gridRows = this.getRows();
|
|
@@ -6805,7 +6770,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6805
6770
|
let displayAction;
|
|
6806
6771
|
if (action === 'expand') {
|
|
6807
6772
|
displayAction = 'table-row';
|
|
6808
|
-
if (!isChild
|
|
6773
|
+
if (!isChild) {
|
|
6809
6774
|
record.expanded = true;
|
|
6810
6775
|
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
|
|
6811
6776
|
}
|
|
@@ -6826,7 +6791,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6826
6791
|
}
|
|
6827
6792
|
else {
|
|
6828
6793
|
displayAction = 'none';
|
|
6829
|
-
if (
|
|
6794
|
+
if (!isChild || isCountRequired(this)) {
|
|
6830
6795
|
record.expanded = false;
|
|
6831
6796
|
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
|
|
6832
6797
|
}
|
|
@@ -6968,7 +6933,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6968
6933
|
data.push(expandingArgs.childData[parseInt(j.toString(), 10)]);
|
|
6969
6934
|
}
|
|
6970
6935
|
}
|
|
6971
|
-
if (isCountRequired(this) && this.loadChildOnDemand && expandingArgs.requestType === 'expand') {
|
|
6936
|
+
if (isCountRequired(this) && !this.loadChildOnDemand && expandingArgs.requestType === 'expand') {
|
|
6972
6937
|
this.dataResults['expandRecord'] = {};
|
|
6973
6938
|
this.dataResults['expandRecord'] = expandingArgs.data;
|
|
6974
6939
|
}
|
|
@@ -7125,7 +7090,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7125
7090
|
}
|
|
7126
7091
|
}
|
|
7127
7092
|
collapseRemoteChild(rowDetails, isChild) {
|
|
7128
|
-
if (!isNullOrUndefined(isChild) && !isChild &&
|
|
7093
|
+
if (!isNullOrUndefined(isChild) && !isChild && this.loadChildOnDemand) {
|
|
7129
7094
|
rowDetails.record.expanded = false;
|
|
7130
7095
|
}
|
|
7131
7096
|
const rows = rowDetails.rows;
|
|
@@ -7252,10 +7217,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7252
7217
|
* @returns {void}
|
|
7253
7218
|
*/
|
|
7254
7219
|
filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
|
|
7255
|
-
if (isNullOrUndefined(fieldName) && isNullOrUndefined(filterOperator) && isNullOrUndefined(filterValue)) {
|
|
7256
|
-
const error = 'The provided value for the fieldName, filterOperator and filterValue are undefined. Please ensure the fieldName, filterOperator and filterValue.';
|
|
7257
|
-
this.trigger(actionFailure, { error: error });
|
|
7258
|
-
}
|
|
7259
7220
|
this.grid.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
|
|
7260
7221
|
}
|
|
7261
7222
|
/**
|
|
@@ -7322,10 +7283,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7322
7283
|
* @returns {void}
|
|
7323
7284
|
*/
|
|
7324
7285
|
paste(data, rowIndex, colIndex) {
|
|
7325
|
-
if (isNullOrUndefined(data) && isNullOrUndefined(rowIndex) && isNullOrUndefined(colIndex)) {
|
|
7326
|
-
const error = 'The provided value for the index is undefined. Please ensure the index contains number.';
|
|
7327
|
-
this.trigger(actionFailure, { error: error });
|
|
7328
|
-
}
|
|
7329
7286
|
this.clipboardModule.paste(data, rowIndex, colIndex);
|
|
7330
7287
|
}
|
|
7331
7288
|
/**
|
|
@@ -7594,10 +7551,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7594
7551
|
* @returns {void}
|
|
7595
7552
|
*/
|
|
7596
7553
|
reorderRows(fromIndexes, toIndex, position) {
|
|
7597
|
-
if (isNullOrUndefined(fromIndexes) && isNullOrUndefined(toIndex) && isNullOrUndefined(position)) {
|
|
7598
|
-
const error = 'The provided value for the fromIndexes, toIndex and position is undefined. Please ensure the fromIndexes and toIndex contains number and position contains string.';
|
|
7599
|
-
this.trigger(actionFailure, { error: error });
|
|
7600
|
-
}
|
|
7601
7554
|
this.rowDragAndDropModule.reorderRows(fromIndexes, toIndex, position);
|
|
7602
7555
|
}
|
|
7603
7556
|
/**
|
|
@@ -7677,7 +7630,7 @@ __decorate$b([
|
|
|
7677
7630
|
Property(false)
|
|
7678
7631
|
], TreeGrid.prototype, "allowPaging", void 0);
|
|
7679
7632
|
__decorate$b([
|
|
7680
|
-
Property(
|
|
7633
|
+
Property(true)
|
|
7681
7634
|
], TreeGrid.prototype, "loadChildOnDemand", void 0);
|
|
7682
7635
|
__decorate$b([
|
|
7683
7636
|
Property(false)
|
|
@@ -9985,7 +9938,9 @@ class ExcelExport {
|
|
|
9985
9938
|
manipulateExportProperties(property, dtSrc, queryResult) {
|
|
9986
9939
|
//count not required for this query
|
|
9987
9940
|
let args = Object();
|
|
9988
|
-
|
|
9941
|
+
if (!isNullOrUndefined(this.parent.grid.getDataModule())) {
|
|
9942
|
+
setValue('query', this.parent.grid.getDataModule().generateQuery(true), args);
|
|
9943
|
+
}
|
|
9989
9944
|
setValue('isExport', true, args);
|
|
9990
9945
|
if (!isNullOrUndefined(property) && !isNullOrUndefined(property.exportType)) {
|
|
9991
9946
|
setValue('exportType', property.exportType, args);
|
|
@@ -11406,10 +11361,11 @@ class BatchEdit {
|
|
|
11406
11361
|
let data;
|
|
11407
11362
|
let childs;
|
|
11408
11363
|
let uid;
|
|
11409
|
-
|
|
11364
|
+
const rowElement = Array.isArray(args.row) ? args.row[0] : args.row;
|
|
11365
|
+
if (!isNullOrUndefined(rowElement) && this.parent.getSelectedRows().indexOf(rowElement) === -1) {
|
|
11410
11366
|
data = args.rowData;
|
|
11411
11367
|
childs = findChildrenRecords(data);
|
|
11412
|
-
uid =
|
|
11368
|
+
uid = rowElement.getAttribute('data-uid');
|
|
11413
11369
|
}
|
|
11414
11370
|
else {
|
|
11415
11371
|
data = this.parent.grid.getSelectedRecords()[this.parent.grid.getSelectedRecords().length - 1];
|
|
@@ -11637,6 +11593,9 @@ class BatchEdit {
|
|
|
11637
11593
|
if (!isNullOrUndefined(addRowRecord)) {
|
|
11638
11594
|
addRowIndex = addRowRecord.index;
|
|
11639
11595
|
}
|
|
11596
|
+
if (isNullOrUndefined(addRecords[parseInt(i.toString(), 10)].index)) {
|
|
11597
|
+
addRowIndex = 0;
|
|
11598
|
+
}
|
|
11640
11599
|
if (this.parent.editSettings.newRowPosition !== 'Top' && this.parent.editSettings.newRowPosition !== 'Bottom') {
|
|
11641
11600
|
if (isNullOrUndefined(addRecords[parseInt(i.toString(), 10)].parentItem) && this.selectedIndex === -1) {
|
|
11642
11601
|
selectedIndex = -1;
|
|
@@ -12155,7 +12114,7 @@ class Edit {
|
|
|
12155
12114
|
else if (isRemoteData(this.parent) ||
|
|
12156
12115
|
(this.parent.dataSource instanceof DataManager && this.parent.dataSource.adaptor instanceof RemoteSaveAdaptor)) {
|
|
12157
12116
|
const query = this.parent.grid.query;
|
|
12158
|
-
if (this.parent['isGantt'] &&
|
|
12117
|
+
if (this.parent['isGantt'] && this.parent.loadChildOnDemand) {
|
|
12159
12118
|
this.updateCell(args, rowIndex);
|
|
12160
12119
|
setValue('isEdit', false, this.parent.grid);
|
|
12161
12120
|
this.afterCellSave(args, row);
|
|
@@ -12446,7 +12405,7 @@ class Edit {
|
|
|
12446
12405
|
args.cancel = true;
|
|
12447
12406
|
return;
|
|
12448
12407
|
}
|
|
12449
|
-
if (this.doubleClickTarget && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
|
|
12408
|
+
if (this.doubleClickTarget && args.requestType !== 'delete' && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
|
|
12450
12409
|
this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-frame'))) {
|
|
12451
12410
|
args.cancel = true;
|
|
12452
12411
|
this.doubleClickTarget = null;
|
|
@@ -12511,6 +12470,7 @@ class Edit {
|
|
|
12511
12470
|
this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
|
|
12512
12471
|
}
|
|
12513
12472
|
}
|
|
12473
|
+
const selectedRecords = this.parent.getSelectedRecords()[0];
|
|
12514
12474
|
if ((this.isAddedRowByMethod || (this.isAddedRowByContextMenu && this.parent.grid.selectedRowIndex !== -1)) &&
|
|
12515
12475
|
(this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
12516
12476
|
this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
|
|
@@ -12518,8 +12478,8 @@ class Edit {
|
|
|
12518
12478
|
this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
|
|
12519
12479
|
}
|
|
12520
12480
|
}
|
|
12521
|
-
else {
|
|
12522
|
-
this.addRowRecord =
|
|
12481
|
+
else if (!isNullOrUndefined(selectedRecords)) {
|
|
12482
|
+
this.addRowRecord = selectedRecords;
|
|
12523
12483
|
}
|
|
12524
12484
|
}
|
|
12525
12485
|
if (this.isAddedRowByMethod && args.index !== 0) {
|
|
@@ -13596,6 +13556,7 @@ class VirtualScroll {
|
|
|
13596
13556
|
*/
|
|
13597
13557
|
constructor(parent) {
|
|
13598
13558
|
this.prevstartIndex = -1;
|
|
13559
|
+
this.setEndIndexToGantt = true;
|
|
13599
13560
|
this.prevendIndex = -1;
|
|
13600
13561
|
this.prevSelectedRecord = [];
|
|
13601
13562
|
this.parent = parent;
|
|
@@ -13694,11 +13655,16 @@ class VirtualScroll {
|
|
|
13694
13655
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13695
13656
|
}
|
|
13696
13657
|
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13697
|
-
if (
|
|
13658
|
+
if (this.setEndIndexToGantt) {
|
|
13659
|
+
this.ganttEndIndex = counts.endIndex;
|
|
13660
|
+
}
|
|
13661
|
+
if ((counts.endIndex + this.parent.pageSettings.pageSize >= counts.count && (this.parent.root && counts.count - this.ganttEndIndex === this.visualData.length - this.parent.root['previousFlatData'].length))
|
|
13698
13662
|
|| !(this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13699
13663
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13700
13664
|
endIndex = counts.count;
|
|
13665
|
+
this.setEndIndexToGantt = false;
|
|
13701
13666
|
}
|
|
13667
|
+
this.ganttEndIndex = endIndex;
|
|
13702
13668
|
this.parent['isAddedFromGantt'] = false;
|
|
13703
13669
|
}
|
|
13704
13670
|
//if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
|