@syncfusion/ej2-treegrid 22.2.9 → 23.1.39
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 +15 -50
- package/dist/ej2-treegrid.min.js +3 -3
- package/dist/ej2-treegrid.umd.min.js +3 -3
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +234 -328
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +233 -351
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +3 -3
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +10 -10
- package/src/treegrid/actions/batch-edit.js +2 -28
- package/src/treegrid/actions/crud-actions.js +1 -1
- package/src/treegrid/actions/edit.js +6 -52
- package/src/treegrid/actions/excel-export.d.ts +2 -2
- package/src/treegrid/actions/freeze-column.d.ts +0 -1
- package/src/treegrid/actions/freeze-column.js +4 -36
- package/src/treegrid/actions/infinite-scroll.js +8 -8
- package/src/treegrid/actions/pdf-export.d.ts +2 -2
- package/src/treegrid/actions/rowdragdrop.js +3 -1
- package/src/treegrid/actions/selection.js +1 -1
- package/src/treegrid/actions/virtual-scroll.js +6 -8
- package/src/treegrid/base/data.js +20 -4
- package/src/treegrid/base/treegrid-model.d.ts +8 -1
- package/src/treegrid/base/treegrid.d.ts +69 -1
- package/src/treegrid/base/treegrid.js +172 -34
- package/src/treegrid/models/column.d.ts +1 -0
- package/src/treegrid/renderer/virtual-row-model-generator.js +4 -4
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +0 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +9 -21
- package/styles/material-dark.css +0 -1
- package/styles/material.css +0 -1
- package/styles/material3-dark.css +0 -1
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +0 -1
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +0 -1
- package/styles/tailwind.css +0 -1
- package/styles/treegrid/bootstrap-dark.scss +1 -1
- package/styles/treegrid/bootstrap.scss +1 -1
- package/styles/treegrid/bootstrap4.scss +1 -1
- package/styles/treegrid/bootstrap5-dark.scss +1 -1
- package/styles/treegrid/bootstrap5.scss +1 -1
- package/styles/treegrid/fabric-dark.scss +1 -1
- package/styles/treegrid/fabric.scss +1 -1
- package/styles/treegrid/fluent-dark.scss +1 -1
- package/styles/treegrid/fluent.scss +1 -1
- package/styles/treegrid/highcontrast-light.scss +1 -1
- package/styles/treegrid/highcontrast.scss +1 -1
- package/styles/treegrid/material-dark.css +0 -1
- package/styles/treegrid/material-dark.scss +1 -1
- package/styles/treegrid/material.css +0 -1
- package/styles/treegrid/material.scss +1 -1
- package/styles/treegrid/material3-dark.css +0 -1
- package/styles/treegrid/material3-dark.scss +1 -1
- package/styles/treegrid/material3.css +0 -1
- package/styles/treegrid/material3.scss +1 -1
- package/styles/treegrid/tailwind-dark.css +0 -1
- package/styles/treegrid/tailwind-dark.scss +1 -1
- package/styles/treegrid/tailwind.css +0 -1
- package/styles/treegrid/tailwind.scss +1 -1
- package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +0 -59
- package/src/treegrid/renderer/virtual-tree-freeze-render.js +0 -163
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, classList, closest, compile, createElement, debounce, extend, getEnumValue, getValue, isNullOrUndefined, merge, remove, removeClass, select, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
|
2
|
-
import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser,
|
|
2
|
+
import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, DetailRow, Edit, ExcelExport, Filter, Freeze, Grid, InfiniteScroll, InterSectionObserver, Logger, Page, PdfExport, Print, RenderType, Reorder, Resize, RowDD, RowDropSettings, RowRenderer, Scroll, Sort, Toolbar, VirtualContentRenderer, VirtualHeaderRenderer, VirtualRowModelGenerator, VirtualScroll, appendChildren, calculateAggregate, detailLists, extend as extend$1, getActualProperties, getNumberFormat, getObject, getTransformValues, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, templateCompiler } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { createCheckBox } from '@syncfusion/ej2-buttons';
|
|
4
4
|
import { CacheAdaptor, DataManager, DataUtil, Deferred, JsonAdaptor, ODataAdaptor, Predicate, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
|
|
5
5
|
import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
@@ -1230,7 +1230,7 @@ class Selection {
|
|
|
1230
1230
|
if (recordIndex > -1) {
|
|
1231
1231
|
let movableTr;
|
|
1232
1232
|
if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
|
|
1233
|
-
movableTr = this.parent.
|
|
1233
|
+
movableTr = this.parent.getDataRows()[parseInt(recordIndex.toString(), 10)];
|
|
1234
1234
|
}
|
|
1235
1235
|
checkbox = tr.querySelectorAll('.e-frame')[0] ? tr.querySelectorAll('.e-frame')[0]
|
|
1236
1236
|
: movableTr.querySelectorAll('.e-frame')[0];
|
|
@@ -1925,9 +1925,13 @@ class DataManipulation {
|
|
|
1925
1925
|
qry.isCountRequired = true;
|
|
1926
1926
|
dm.executeQuery(qry).then((e) => {
|
|
1927
1927
|
this.parentItems = DataUtil.distinct(e.result, this.parent.parentIdMapping, false);
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1928
|
+
let req;
|
|
1929
|
+
if (e.result) {
|
|
1930
|
+
req = 0;
|
|
1931
|
+
}
|
|
1932
|
+
else {
|
|
1933
|
+
req = 1;
|
|
1934
|
+
}
|
|
1931
1935
|
if (req === 0) {
|
|
1932
1936
|
setValue('grid.contentModule.isLoaded', true, this.parent);
|
|
1933
1937
|
if (!isNullOrUndefined(this.zerothLevelData)) {
|
|
@@ -2180,7 +2184,19 @@ class DataManipulation {
|
|
|
2180
2184
|
const remoteCollapsedData = 'remoteCollapsedData';
|
|
2181
2185
|
const level = 'level';
|
|
2182
2186
|
let datas = this.parent.grid.currentViewData.slice();
|
|
2183
|
-
let inx
|
|
2187
|
+
let inx;
|
|
2188
|
+
const idMapping = this.parent.idMapping;
|
|
2189
|
+
if (this.parent['isGantt'] && !this.parent.loadChildOnDemand && this.parent.hasChildMapping) {
|
|
2190
|
+
for (let i = 0; i < this.parent.grid.currentViewData.length; i++) {
|
|
2191
|
+
if (rowDetails.record[idMapping] === this.parent.grid.currentViewData[i][idMapping]) {
|
|
2192
|
+
inx = i;
|
|
2193
|
+
break;
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
else {
|
|
2198
|
+
inx = datas.indexOf(rowDetails.record);
|
|
2199
|
+
}
|
|
2184
2200
|
if (this.parent.enableVirtualization && (rowDetails.action === 'collapse' || rowDetails.action === 'remoteExpand')) {
|
|
2185
2201
|
datas = [];
|
|
2186
2202
|
for (let i = 0; i < inx; i++) {
|
|
@@ -3293,7 +3309,7 @@ function updateParentRow(key, record, action, control, isSelfReference, child) {
|
|
|
3293
3309
|
}
|
|
3294
3310
|
let movableRow;
|
|
3295
3311
|
if (control.frozenRows || control.getFrozenColumns()) {
|
|
3296
|
-
movableRow = control.
|
|
3312
|
+
movableRow = control.getRowByIndex(index);
|
|
3297
3313
|
}
|
|
3298
3314
|
if (!control.enableVirtualization && !isNullOrUndefined(row) || !isNullOrUndefined(movableRow)) {
|
|
3299
3315
|
let index = control.treeColumnIndex;
|
|
@@ -3436,6 +3452,112 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3436
3452
|
pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
3437
3453
|
return this.pdfExportModule.Map(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
3438
3454
|
}
|
|
3455
|
+
/**
|
|
3456
|
+
* Sends a post request to export tree grid to excel file in server side.
|
|
3457
|
+
*
|
|
3458
|
+
* @param {string} url - Pass URL for server side excel export action.
|
|
3459
|
+
* @returns {void}
|
|
3460
|
+
*/
|
|
3461
|
+
serverExcelExport(url) {
|
|
3462
|
+
this.isExcel = true;
|
|
3463
|
+
this.exportTreeGrid(url);
|
|
3464
|
+
}
|
|
3465
|
+
/**
|
|
3466
|
+
* Sends a post request to export tree grid to pdf file in server side.
|
|
3467
|
+
*
|
|
3468
|
+
* @param {string} url - Pass URL for server-side pdf export action.
|
|
3469
|
+
* @returns {void}
|
|
3470
|
+
*/
|
|
3471
|
+
serverPdfExport(url) {
|
|
3472
|
+
this.isExcel = false;
|
|
3473
|
+
this.exportTreeGrid(url);
|
|
3474
|
+
}
|
|
3475
|
+
/**
|
|
3476
|
+
* Sends a Post request to export Tree Grid to CSV file in server side.
|
|
3477
|
+
*
|
|
3478
|
+
* @param {string} url - Pass URL for server-side csv export action.
|
|
3479
|
+
* @returns {void}
|
|
3480
|
+
*/
|
|
3481
|
+
serverCsvExport(url) {
|
|
3482
|
+
this.isExcel = true;
|
|
3483
|
+
this.exportTreeGrid(url);
|
|
3484
|
+
}
|
|
3485
|
+
/**
|
|
3486
|
+
* Exports the TreeGrid data to the specified URL using a POST request.
|
|
3487
|
+
* @param {string} url - Defines exporting url
|
|
3488
|
+
* @returns {void}
|
|
3489
|
+
*/
|
|
3490
|
+
exportTreeGrid(url) {
|
|
3491
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
3492
|
+
const treegrid = this;
|
|
3493
|
+
const query = treegrid.grid.getDataModule().generateQuery(true);
|
|
3494
|
+
const state = new UrlAdaptor().processQuery(new DataManager({ url: '' }), query);
|
|
3495
|
+
const queries = JSON.parse(state.data);
|
|
3496
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3497
|
+
const treeGridModel = JSON.parse(this.addOnPersist(['allowPaging', 'pageSettings', 'sortSettings', 'allowPdfExport', 'allowExcelExport', 'aggregates',
|
|
3498
|
+
'filterSettings', 'columns', 'locale', 'searchSettings', 'idMapping', 'parentIdMapping', 'childMapping', 'treeColumnIndex']));
|
|
3499
|
+
const include = ['field', 'headerText', 'type', 'format', 'visible',
|
|
3500
|
+
'template', 'index', 'width', 'textAlign', 'headerTextAlign', 'columns'];
|
|
3501
|
+
treeGridModel.filterSettings.columns = queries.where;
|
|
3502
|
+
treeGridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];
|
|
3503
|
+
treeGridModel.sortSettings.columns = queries.sorted;
|
|
3504
|
+
treeGridModel.columns = this.setHeaderText(treeGridModel.columns, include);
|
|
3505
|
+
const form = this.createElement('form', { id: 'ExportForm', styles: 'display:none;' });
|
|
3506
|
+
const treeGridInput = this.createElement('input', { id: 'treeGridInput', attrs: { name: 'treeGridModel' } });
|
|
3507
|
+
treeGridInput.value = JSON.stringify(treeGridModel);
|
|
3508
|
+
form.method = 'POST';
|
|
3509
|
+
form.action = url;
|
|
3510
|
+
form.appendChild(treeGridInput);
|
|
3511
|
+
document.body.appendChild(form);
|
|
3512
|
+
form.submit();
|
|
3513
|
+
form.remove();
|
|
3514
|
+
}
|
|
3515
|
+
/**
|
|
3516
|
+
* Sets the header text and other properties for an array of columns based on specified criteria.
|
|
3517
|
+
* @param {Column[]} columns - Defines array of columns
|
|
3518
|
+
* @param {string[]} include - Defines array of sting
|
|
3519
|
+
* @returns {Column[]} returns array of columns
|
|
3520
|
+
*/
|
|
3521
|
+
setHeaderText(columns, include) {
|
|
3522
|
+
for (let i = 0; i < columns.length; i++) {
|
|
3523
|
+
let column = this.getColumnByUid(columns[parseInt(i.toString(), 10)].uid);
|
|
3524
|
+
if (this.stackedHeader && isNullOrUndefined(column)) {
|
|
3525
|
+
column = !isNullOrUndefined(columns[parseInt(i.toString(), 10)].field) ?
|
|
3526
|
+
this.getColumnByField(columns[parseInt(i.toString(), 10)].field) : columns[parseInt(i.toString(), 10)];
|
|
3527
|
+
}
|
|
3528
|
+
columns[parseInt(i.toString(), 10)].headerText = column.headerText;
|
|
3529
|
+
if (!isNullOrUndefined(column.template)) {
|
|
3530
|
+
columns[parseInt(i.toString(), 10)].template = 'true';
|
|
3531
|
+
}
|
|
3532
|
+
if (columns[parseInt(i.toString(), 10)].format) {
|
|
3533
|
+
columns[parseInt(i.toString(), 10)].format = getNumberFormat(this.getFormat(column.format), column.type, false, this.currencyCode);
|
|
3534
|
+
if (!this.isExcel && (column.type === 'datetime' || column.type === 'date')) {
|
|
3535
|
+
columns[parseInt(i.toString(), 10)].format = columns[parseInt(i.toString(), 10)].format.toString().replace('AM/PM', 'tt');
|
|
3536
|
+
}
|
|
3537
|
+
columns[parseInt(i.toString(), 10)].type = column.type;
|
|
3538
|
+
}
|
|
3539
|
+
if (columns[parseInt(i.toString(), 10)].columns) {
|
|
3540
|
+
this.setHeaderText(columns[parseInt(i.toString(), 10)].columns, include);
|
|
3541
|
+
}
|
|
3542
|
+
const keys = Object.keys(columns[parseInt(i.toString(), 10)]);
|
|
3543
|
+
for (let j = 0; j < keys.length; j++) {
|
|
3544
|
+
if (include.indexOf(keys[parseInt(j.toString(), 10)]) < 0) {
|
|
3545
|
+
delete columns[parseInt(i.toString(), 10)][keys[parseInt(j.toString(), 10)]];
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
return columns;
|
|
3550
|
+
}
|
|
3551
|
+
/**
|
|
3552
|
+
* Retrieves the appropriate format string from the given format options.
|
|
3553
|
+
*
|
|
3554
|
+
* @param {string | NumberFormatOptions | DateFormatOptions} format - The format options to retrieve the format string from.
|
|
3555
|
+
* @returns {string} The format string extracted from the provided format options.
|
|
3556
|
+
*/
|
|
3557
|
+
getFormat(format) {
|
|
3558
|
+
return typeof (format) === 'object' ? !isNullOrUndefined(format.format) ?
|
|
3559
|
+
format.format : format.skeleton : format;
|
|
3560
|
+
}
|
|
3439
3561
|
/**
|
|
3440
3562
|
* For internal use only - Get the module name.
|
|
3441
3563
|
*
|
|
@@ -3711,7 +3833,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3711
3833
|
requiredModules() {
|
|
3712
3834
|
const modules = [];
|
|
3713
3835
|
const splitFrozenCount = 'splitFrozenCount';
|
|
3714
|
-
this.grid[`${splitFrozenCount}`](this.
|
|
3836
|
+
this.grid[`${splitFrozenCount}`](this.getColumns());
|
|
3715
3837
|
if (this.isDestroyed) {
|
|
3716
3838
|
return modules;
|
|
3717
3839
|
}
|
|
@@ -4068,9 +4190,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4068
4190
|
IsExpandCollapseClicked(args) {
|
|
4069
4191
|
if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
4070
4192
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
|
|
4071
|
-
&&
|
|
4072
|
-
args.
|
|
4073
|
-
|
|
4193
|
+
&& !this.selectionSettings.checkboxOnly) {
|
|
4194
|
+
if ((!isNullOrUndefined(args.data) && args.data['hasChildRecords']) || (args.rowIndex !== -1 && isNullOrUndefined(args.data))) {
|
|
4195
|
+
args.cancel = true;
|
|
4196
|
+
return;
|
|
4197
|
+
}
|
|
4074
4198
|
}
|
|
4075
4199
|
}
|
|
4076
4200
|
bindGridEvents() {
|
|
@@ -4186,9 +4310,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4186
4310
|
this.updateAltRow(this.getRows());
|
|
4187
4311
|
this.notify('dataBoundArg', args);
|
|
4188
4312
|
if (isRemoteData(this) && !isOffline(this) && !this.hasChildMapping) {
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4313
|
+
let req;
|
|
4314
|
+
if (this.dataResults.result) {
|
|
4315
|
+
req = 0;
|
|
4316
|
+
}
|
|
4317
|
+
else {
|
|
4318
|
+
req = 1;
|
|
4319
|
+
}
|
|
4192
4320
|
setValue('grid.contentModule.isLoaded', !(req > 0), this);
|
|
4193
4321
|
}
|
|
4194
4322
|
if (this.isPixelHeight() && this.initialRender) {
|
|
@@ -5143,6 +5271,18 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5143
5271
|
}
|
|
5144
5272
|
this.isEditCollapse = false;
|
|
5145
5273
|
this.notify('checkboxSelection', { target: target });
|
|
5274
|
+
if (this.grid.isCheckBoxSelection && !this.grid.isPersistSelection) {
|
|
5275
|
+
if (this.aggregates.map((ag) => ag.showChildSummary === true).length) {
|
|
5276
|
+
const checkedTarget = this.grid.getHeaderContent().querySelector('.e-checkselectall');
|
|
5277
|
+
const checkedLen = this.grid.getSelectedRowIndexes().length;
|
|
5278
|
+
const totalRecords = this.getCurrentViewRecords().length;
|
|
5279
|
+
if (checkedLen === totalRecords) {
|
|
5280
|
+
const spanEle = checkedTarget.nextElementSibling;
|
|
5281
|
+
removeClass([spanEle], ['e-stop', 'e-uncheck']);
|
|
5282
|
+
addClass([spanEle], ['e-check']);
|
|
5283
|
+
}
|
|
5284
|
+
}
|
|
5285
|
+
}
|
|
5146
5286
|
}
|
|
5147
5287
|
/**
|
|
5148
5288
|
* Returns TreeGrid rows
|
|
@@ -5935,7 +6075,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5935
6075
|
const children = 'Children';
|
|
5936
6076
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record[`${children}`]))) {
|
|
5937
6077
|
let expandArgs = { data: record, row: row };
|
|
5938
|
-
this.setHeightForFrozenContent();
|
|
5939
6078
|
if (!isNullOrUndefined(this.expandStateMapping)) {
|
|
5940
6079
|
this.updateExpandStateMapping(expandArgs.data, true);
|
|
5941
6080
|
}
|
|
@@ -5962,12 +6101,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5962
6101
|
this.expandCollapse(action, null, records[parseInt(i.toString(), 10)]);
|
|
5963
6102
|
}
|
|
5964
6103
|
}
|
|
5965
|
-
setHeightForFrozenContent() {
|
|
5966
|
-
const freeze = (this.grid.getFrozenLeftColumnsCount() > 0 || this.grid.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
5967
|
-
if (this.grid.getFrozenColumns() > 0 || freeze) {
|
|
5968
|
-
this.grid.contentModule.refreshScrollOffset();
|
|
5969
|
-
}
|
|
5970
|
-
}
|
|
5971
6104
|
getCollapseExpandRecords(row, record) {
|
|
5972
6105
|
if (this.allowPaging && this.pageSettings.pageSizeMode === 'All' && this.isExpandAll && isNullOrUndefined(record) &&
|
|
5973
6106
|
!isRemoteData(this)) {
|
|
@@ -6043,7 +6176,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6043
6176
|
this.expandCollapse('collapse', row, record);
|
|
6044
6177
|
let collapseArgs = { data: record, row: row };
|
|
6045
6178
|
if (!isRemoteData(this)) {
|
|
6046
|
-
this.setHeightForFrozenContent();
|
|
6047
6179
|
if (!isNullOrUndefined(this.expandStateMapping)) {
|
|
6048
6180
|
this.updateExpandStateMapping(collapseArgs.data, false);
|
|
6049
6181
|
}
|
|
@@ -6488,7 +6620,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6488
6620
|
this.isExpandRefresh = true;
|
|
6489
6621
|
const scrollHeightBeforeRefresh = this.getContentTable().parentElement.scrollTop;
|
|
6490
6622
|
this.grid.refresh();
|
|
6491
|
-
this.setHeightForFrozenContent();
|
|
6492
6623
|
if (this.enableInfiniteScrolling) {
|
|
6493
6624
|
this.getContentTable().parentElement.scrollTop = scrollHeightBeforeRefresh;
|
|
6494
6625
|
}
|
|
@@ -6509,7 +6640,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6509
6640
|
this.notify(remoteExpand, { record: record, rows: rows, parentRow: row });
|
|
6510
6641
|
const args = { row: row, data: record };
|
|
6511
6642
|
if (rows.length > 0) {
|
|
6512
|
-
this.setHeightForFrozenContent();
|
|
6513
6643
|
this.trigger(expanded, args);
|
|
6514
6644
|
}
|
|
6515
6645
|
}
|
|
@@ -6518,7 +6648,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6518
6648
|
}
|
|
6519
6649
|
else {
|
|
6520
6650
|
this.collapseRemoteChild({ record: record, rows: rows });
|
|
6521
|
-
this.setHeightForFrozenContent();
|
|
6522
6651
|
this.trigger(collapsed, args);
|
|
6523
6652
|
}
|
|
6524
6653
|
}
|
|
@@ -6551,10 +6680,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6551
6680
|
}
|
|
6552
6681
|
const freeze = (this.grid.getFrozenLeftColumnsCount() > 0 || this.grid.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
6553
6682
|
if (this.frozenRows || this.frozenColumns || this.getFrozenColumns() || freeze) {
|
|
6554
|
-
movableRows = this.
|
|
6683
|
+
movableRows = this.getRows().filter((r) => r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1)));
|
|
6555
6684
|
}
|
|
6556
6685
|
if (freeze) {
|
|
6557
|
-
freezeRightRows = this.
|
|
6686
|
+
freezeRightRows = this.getRows().filter((r) => r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1)));
|
|
6558
6687
|
}
|
|
6559
6688
|
const gridRowsObject = this.grid.getRowsObject();
|
|
6560
6689
|
const currentViewData = this.grid.currentViewData;
|
|
@@ -6650,8 +6779,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6650
6779
|
let rightrows = [];
|
|
6651
6780
|
const freeze = (this.getFrozenLeftColumnsCount() > 0 || this.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
6652
6781
|
if (freeze) {
|
|
6653
|
-
movablerows = this.
|
|
6654
|
-
rightrows = this.
|
|
6782
|
+
movablerows = this.getRows().filter((r) => r.querySelector('.e-gridrowindex' + rowDetails.record.index + 'level' + (rowDetails.record.level + 1)));
|
|
6783
|
+
rightrows = this.getRows().filter((r) => r.querySelector('.e-gridrowindex' + rowDetails.record.index + 'level' + (rowDetails.record.level + 1)));
|
|
6655
6784
|
}
|
|
6656
6785
|
for (let i = 0; i < rows.length; i++) {
|
|
6657
6786
|
rows[parseInt(i.toString(), 10)].style.display = 'none';
|
|
@@ -6859,59 +6988,72 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6859
6988
|
* @param {number} rowIndex - Specifies the row index.
|
|
6860
6989
|
* @param {number} columnIndex - Specifies the column index.
|
|
6861
6990
|
* @returns {Element} - Returns movable cell element from the indexes passed
|
|
6991
|
+
*
|
|
6992
|
+
* @deprecated This method is deprecated. Use getCellFromIndex method instead.
|
|
6862
6993
|
*/
|
|
6863
6994
|
getMovableCellFromIndex(rowIndex, columnIndex) {
|
|
6864
|
-
return this.grid.
|
|
6995
|
+
return this.grid.getCellFromIndex(rowIndex, columnIndex);
|
|
6865
6996
|
}
|
|
6866
6997
|
/**
|
|
6867
6998
|
* Gets all the TreeGrid's movable table data rows.
|
|
6868
6999
|
*
|
|
6869
7000
|
* @returns {Element[]} - Returns element collection of movable rows
|
|
7001
|
+
*
|
|
7002
|
+
* @deprecated This method is deprecated. Use getDataRows method instead.
|
|
6870
7003
|
*/
|
|
6871
7004
|
getMovableDataRows() {
|
|
6872
|
-
return this.grid.
|
|
7005
|
+
return this.grid.getDataRows();
|
|
6873
7006
|
}
|
|
6874
7007
|
/**
|
|
6875
7008
|
* Gets a movable tables row by index.
|
|
6876
7009
|
*
|
|
6877
7010
|
* @param {number} index - Specifies the row index.
|
|
6878
7011
|
* @returns {Element} - Returns movable row based on index passed
|
|
7012
|
+
*
|
|
7013
|
+
* @deprecated This method is deprecated. Use getRowByIndex method instead.
|
|
6879
7014
|
*/
|
|
6880
7015
|
getMovableRowByIndex(index) {
|
|
6881
|
-
return this.grid.
|
|
7016
|
+
return this.grid.getRowByIndex(index);
|
|
6882
7017
|
}
|
|
6883
7018
|
/**
|
|
6884
7019
|
* Gets the TreeGrid's movable content rows from frozen treegrid.
|
|
6885
7020
|
*
|
|
6886
7021
|
* @returns {Element[]}: Returns movable row element
|
|
7022
|
+
* @deprecated This method is deprecated. Use getRows method instead.
|
|
6887
7023
|
*/
|
|
6888
7024
|
getMovableRows() {
|
|
6889
|
-
return this.grid.
|
|
7025
|
+
return this.grid.getRows();
|
|
6890
7026
|
}
|
|
6891
7027
|
/**
|
|
6892
7028
|
* Gets a frozen right tables row element by index.
|
|
6893
7029
|
*
|
|
6894
7030
|
* @param {number} index - Specifies the row index.
|
|
6895
7031
|
* @returns {Element} returns the element
|
|
7032
|
+
*
|
|
7033
|
+
* @deprecated This method is deprecated. Use getRowByIndex method instead.
|
|
6896
7034
|
*/
|
|
6897
7035
|
getFrozenRightRowByIndex(index) {
|
|
6898
|
-
return this.grid.
|
|
7036
|
+
return this.grid.getRowByIndex(index);
|
|
6899
7037
|
}
|
|
6900
7038
|
/**
|
|
6901
7039
|
* Gets the Tree Grid's frozen right content rows from frozen Tree Grid.
|
|
6902
7040
|
*
|
|
6903
7041
|
* @returns {Element[]} returns the element
|
|
7042
|
+
*
|
|
7043
|
+
* @deprecated This method is deprecated. Use getRows method instead.
|
|
6904
7044
|
*/
|
|
6905
7045
|
getFrozenRightRows() {
|
|
6906
|
-
return this.grid.
|
|
7046
|
+
return this.grid.getRows();
|
|
6907
7047
|
}
|
|
6908
7048
|
/**
|
|
6909
7049
|
* Gets all the Tree Grid's frozen right table data rows.
|
|
6910
7050
|
*
|
|
6911
7051
|
* @returns {Element[]} Returns the Element
|
|
7052
|
+
*
|
|
7053
|
+
* @deprecated This method is deprecated. Use getDataRows method instead.
|
|
6912
7054
|
*/
|
|
6913
7055
|
getFrozenRightDataRows() {
|
|
6914
|
-
return this.grid.
|
|
7056
|
+
return this.grid.getDataRows();
|
|
6915
7057
|
}
|
|
6916
7058
|
/**
|
|
6917
7059
|
* Gets a frozen right table cell by row and column index.
|
|
@@ -6919,36 +7061,44 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6919
7061
|
* @param {number} rowIndex - Specifies the row index.
|
|
6920
7062
|
* @param {number} columnIndex - Specifies the column index.
|
|
6921
7063
|
* @returns {Element} Returns the Element
|
|
7064
|
+
*
|
|
7065
|
+
* @deprecated This method is deprecated. Use getCellFromIndex method instead.
|
|
6922
7066
|
*/
|
|
6923
7067
|
getFrozenRightCellFromIndex(rowIndex, columnIndex) {
|
|
6924
|
-
return this.grid.
|
|
7068
|
+
return this.grid.getCellFromIndex(rowIndex, columnIndex);
|
|
6925
7069
|
}
|
|
6926
7070
|
/**
|
|
6927
7071
|
* Gets a frozen left column header by column index.
|
|
6928
7072
|
*
|
|
6929
7073
|
* @param {number} index - Specifies the column index.
|
|
6930
7074
|
* @returns {Element} Returns the Element
|
|
7075
|
+
*
|
|
7076
|
+
* @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
|
|
6931
7077
|
*/
|
|
6932
7078
|
getFrozenLeftColumnHeaderByIndex(index) {
|
|
6933
|
-
return this.grid.
|
|
7079
|
+
return this.grid.getColumnHeaderByIndex(index);
|
|
6934
7080
|
}
|
|
6935
7081
|
/**
|
|
6936
7082
|
* Gets a frozen right column header by column index.
|
|
6937
7083
|
*
|
|
6938
7084
|
* @param {number} index - Specifies the column index.
|
|
6939
7085
|
* @returns {Element} Returns the Element
|
|
7086
|
+
*
|
|
7087
|
+
* @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
|
|
6940
7088
|
*/
|
|
6941
7089
|
getFrozenRightColumnHeaderByIndex(index) {
|
|
6942
|
-
return this.grid.
|
|
7090
|
+
return this.grid.getColumnHeaderByIndex(index);
|
|
6943
7091
|
}
|
|
6944
7092
|
/**
|
|
6945
7093
|
* Gets a movable column header by column index.
|
|
6946
7094
|
*
|
|
6947
7095
|
* @param {number} index - Specifies the column index.
|
|
6948
7096
|
* @returns {Element} Returns the Element
|
|
7097
|
+
*
|
|
7098
|
+
* @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
|
|
6949
7099
|
*/
|
|
6950
7100
|
getMovableColumnHeaderByIndex(index) {
|
|
6951
|
-
return this.grid.
|
|
7101
|
+
return this.grid.getColumnHeaderByIndex(index);
|
|
6952
7102
|
}
|
|
6953
7103
|
/**
|
|
6954
7104
|
* @hidden
|
|
@@ -7182,6 +7332,9 @@ __decorate([
|
|
|
7182
7332
|
__decorate([
|
|
7183
7333
|
Complex({}, RowDropSettings)
|
|
7184
7334
|
], TreeGrid.prototype, "rowDropSettings", void 0);
|
|
7335
|
+
__decorate([
|
|
7336
|
+
Property('USD')
|
|
7337
|
+
], TreeGrid.prototype, "currencyCode", void 0);
|
|
7185
7338
|
__decorate([
|
|
7186
7339
|
Property()
|
|
7187
7340
|
], TreeGrid.prototype, "pagerTemplate", void 0);
|
|
@@ -8315,6 +8468,9 @@ class RowDD$1 {
|
|
|
8315
8468
|
if (!tObj.rowDropSettings.targetID && this.canDrop) {
|
|
8316
8469
|
tObj.rowDragAndDropModule.updateIcon(args.rows, rowIdx, args);
|
|
8317
8470
|
}
|
|
8471
|
+
if (isNullOrUndefined(tObj.rowDropSettings.targetID) && !this.canDrop) {
|
|
8472
|
+
this.removetopOrBottomBorder();
|
|
8473
|
+
}
|
|
8318
8474
|
if (tObj.rowDropSettings.targetID) {
|
|
8319
8475
|
const dropElement = parentsUntil(args.target, 'e-treegrid');
|
|
8320
8476
|
if (dropElement && dropElement.id === this.parent.rowDropSettings.targetID) {
|
|
@@ -8338,7 +8494,6 @@ class RowDD$1 {
|
|
|
8338
8494
|
this.dropPosition = 'Invalid';
|
|
8339
8495
|
}
|
|
8340
8496
|
setValue('dropPosition', this.dropPosition, args);
|
|
8341
|
-
args.dropIndex = args.dropIndex === args.fromIndex ? this.getTargetIdx(args.target.parentElement) : args.dropIndex;
|
|
8342
8497
|
tObj.trigger(rowDrop, args);
|
|
8343
8498
|
if (!args.cancel) {
|
|
8344
8499
|
if (!isCountRequired(this.parent)) {
|
|
@@ -9077,8 +9232,8 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9077
9232
|
const currentPage = this[`${model}`].currentPage;
|
|
9078
9233
|
if (clear) {
|
|
9079
9234
|
this.cache = {};
|
|
9080
|
-
this.movableCache = {};
|
|
9081
|
-
this.frozenRightCache = {}
|
|
9235
|
+
/*this.movableCache = {};
|
|
9236
|
+
this.frozenRightCache = {};*/
|
|
9082
9237
|
this.data = {};
|
|
9083
9238
|
this.groups = {};
|
|
9084
9239
|
}
|
|
@@ -9093,8 +9248,8 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9093
9248
|
this.cache = {};
|
|
9094
9249
|
this.data = {};
|
|
9095
9250
|
this.groups = {};
|
|
9096
|
-
this.movableCache = {};
|
|
9097
|
-
this.frozenRightCache = {}
|
|
9251
|
+
/*this.movableCache = {};
|
|
9252
|
+
this.frozenRightCache = {};*/
|
|
9098
9253
|
}
|
|
9099
9254
|
}
|
|
9100
9255
|
return clear;
|
|
@@ -10669,22 +10824,8 @@ class BatchEdit {
|
|
|
10669
10824
|
this.batchAddedRecords = this.batchRecords = this.batchAddRowRecord = this.batchDeletedRecords = this.currentViewRecords = [];
|
|
10670
10825
|
}
|
|
10671
10826
|
cellSaved(args) {
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
if (frozenCols && args.columnObject.index > frozenCols) {
|
|
10675
|
-
actualCellIndex = actualCellIndex + frozenCols;
|
|
10676
|
-
}
|
|
10677
|
-
const freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
10678
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
10679
|
-
if (freeze) {
|
|
10680
|
-
const colCount = this.parent.getFrozenLeftColumnsCount() + actualCellIndex;
|
|
10681
|
-
if (colCount === this.parent.treeColumnIndex) {
|
|
10682
|
-
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
10683
|
-
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
10684
|
-
});
|
|
10685
|
-
}
|
|
10686
|
-
}
|
|
10687
|
-
else if (actualCellIndex === this.parent.treeColumnIndex) {
|
|
10827
|
+
const actualCellIndex = args.column.index;
|
|
10828
|
+
if (actualCellIndex === this.parent.treeColumnIndex) {
|
|
10688
10829
|
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
10689
10830
|
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
10690
10831
|
});
|
|
@@ -10888,7 +11029,7 @@ class BatchEdit {
|
|
|
10888
11029
|
for (let i = firstChildIndex; i <= totalCount; i++) {
|
|
10889
11030
|
row.push(this.parent.grid.getDataRows()[parseInt(i.toString(), 10)]);
|
|
10890
11031
|
if (this.parent.frozenRows || this.parent.frozenColumns || this.parent.getFrozenColumns()) {
|
|
10891
|
-
row.push(this.parent.grid.
|
|
11032
|
+
row.push(this.parent.grid.getHeaderContent()[parseInt(i.toString(), 10)]);
|
|
10892
11033
|
}
|
|
10893
11034
|
}
|
|
10894
11035
|
}
|
|
@@ -10920,18 +11061,6 @@ class BatchEdit {
|
|
|
10920
11061
|
for (let i = 0; i < rows.length; i++) {
|
|
10921
11062
|
rows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
10922
11063
|
}
|
|
10923
|
-
const freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
10924
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
10925
|
-
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
|
|
10926
|
-
const mRows = this.parent.grid.getMovableDataRows();
|
|
10927
|
-
const freezeRightRows = this.parent.grid.getFrozenRightDataRows();
|
|
10928
|
-
for (let i = 0; i < mRows.length; i++) {
|
|
10929
|
-
mRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
10930
|
-
if (freeze) {
|
|
10931
|
-
freezeRightRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
10932
|
-
}
|
|
10933
|
-
}
|
|
10934
|
-
}
|
|
10935
11064
|
}
|
|
10936
11065
|
updateChildCount(records) {
|
|
10937
11066
|
const primaryKey = this.parent.grid.getPrimaryKeyFieldNames()[0];
|
|
@@ -11389,8 +11518,8 @@ class Edit$1 {
|
|
|
11389
11518
|
currentData.splice(newRowObjectIndex, 0, newRecord);
|
|
11390
11519
|
this.updateInfiniteCurrentViewData(newRecord, this.addRowIndex);
|
|
11391
11520
|
}
|
|
11392
|
-
const movableRows = this.parent.grid.
|
|
11393
|
-
const movableRowsObject = this.parent.grid.
|
|
11521
|
+
const movableRows = this.parent.grid.getRows();
|
|
11522
|
+
const movableRowsObject = this.parent.grid.getRowsObject();
|
|
11394
11523
|
const isCache = this.parent.infiniteScrollSettings.enableCache;
|
|
11395
11524
|
if (!isCache) {
|
|
11396
11525
|
resetRowIndex(this.parent.grid, this.parent.grid.getRowsObject(), this.parent.grid.getRows(), 0);
|
|
@@ -11594,16 +11723,13 @@ class Edit$1 {
|
|
|
11594
11723
|
if (this.parent.getRows().indexOf(row) !== -1) {
|
|
11595
11724
|
rowIndex = this.parent.getRows().indexOf(row);
|
|
11596
11725
|
}
|
|
11597
|
-
else if (this.parent.getFrozenRightRows().indexOf(row) !== -1) {
|
|
11598
|
-
rowIndex = this.parent.getFrozenRightRows().indexOf(row);
|
|
11599
|
-
}
|
|
11600
11726
|
else {
|
|
11601
|
-
rowIndex = this.parent.
|
|
11727
|
+
rowIndex = this.parent.getRows().indexOf(row);
|
|
11602
11728
|
}
|
|
11603
11729
|
}
|
|
11604
11730
|
else {
|
|
11605
11731
|
rowIndex = (this.parent.getRows().indexOf(row) === -1 && (this.parent.getFrozenColumns() > 0)) ?
|
|
11606
|
-
this.parent.grid.
|
|
11732
|
+
this.parent.grid.getRows().indexOf(row) : this.parent.getRows().indexOf(row);
|
|
11607
11733
|
}
|
|
11608
11734
|
}
|
|
11609
11735
|
const arg = {};
|
|
@@ -11659,7 +11785,6 @@ class Edit$1 {
|
|
|
11659
11785
|
}
|
|
11660
11786
|
}
|
|
11661
11787
|
afterCellSave(args, row, rowIndex) {
|
|
11662
|
-
let mRow;
|
|
11663
11788
|
if (this.parent.grid.aggregateModule) {
|
|
11664
11789
|
this.parent.grid.aggregateModule.refresh(args.rowData);
|
|
11665
11790
|
}
|
|
@@ -11670,31 +11795,6 @@ class Edit$1 {
|
|
|
11670
11795
|
this.isOnBatch = false;
|
|
11671
11796
|
}
|
|
11672
11797
|
this.enableToolbarItems('save');
|
|
11673
|
-
const freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
11674
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
11675
|
-
if (freeze) {
|
|
11676
|
-
if (args.cell.closest('.e-frozen-left-header') || args.cell.closest('.e-frozen-left-content')) {
|
|
11677
|
-
mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
|
|
11678
|
-
}
|
|
11679
|
-
else if (args.cell.closest('.e-movableheader') || args.cell.closest('.e-movablecontent')) {
|
|
11680
|
-
mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
|
|
11681
|
-
}
|
|
11682
|
-
else {
|
|
11683
|
-
mRow = this.parent.grid.getFrozenRightRows()[parseInt(rowIndex.toString(), 10)];
|
|
11684
|
-
}
|
|
11685
|
-
removeClass([mRow], ['e-editedrow', 'e-batchrow']);
|
|
11686
|
-
removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
11687
|
-
}
|
|
11688
|
-
else if (this.parent.getFrozenColumns() > 0) {
|
|
11689
|
-
if (args.cell.closest('.e-frozenheader') || args.cell.closest('.e-frozencontent')) {
|
|
11690
|
-
mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
|
|
11691
|
-
}
|
|
11692
|
-
else {
|
|
11693
|
-
mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
|
|
11694
|
-
}
|
|
11695
|
-
removeClass([mRow], ['e-editedrow', 'e-batchrow']);
|
|
11696
|
-
removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
11697
|
-
}
|
|
11698
11798
|
removeClass([row], ['e-editedrow', 'e-batchrow']);
|
|
11699
11799
|
removeClass(row.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
11700
11800
|
if (this.parent['isCellSaveFocus'] !== false) {
|
|
@@ -11880,23 +11980,6 @@ class Edit$1 {
|
|
|
11880
11980
|
this.parent.grid.contentModule[`${r}`].splice(0, 1);
|
|
11881
11981
|
this.parent.grid.contentModule[`${r}`].splice(rowObjectIndex, 0, newRowObject);
|
|
11882
11982
|
}
|
|
11883
|
-
const freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
11884
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
11885
|
-
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
|
|
11886
|
-
const movableRows = this.parent.getMovableDataRows();
|
|
11887
|
-
const frows = 'freezeRows';
|
|
11888
|
-
const newFreezeRowObject = this.parent.grid.getRowsObject()[0];
|
|
11889
|
-
movableRows[index + 1][`${position}`](movableRows[0]);
|
|
11890
|
-
if (freeze) {
|
|
11891
|
-
const rightFrozenRows = this.parent.getFrozenRightDataRows();
|
|
11892
|
-
rightFrozenRows[index + 1][`${position}`](rightFrozenRows[0]);
|
|
11893
|
-
}
|
|
11894
|
-
if (this.parent.editSettings.mode === 'Batch') {
|
|
11895
|
-
this.parent.grid.contentModule[`${frows}`].splice(0, 1);
|
|
11896
|
-
this.parent.grid.contentModule[`${frows}`].splice(rowObjectIndex, 0, newFreezeRowObject);
|
|
11897
|
-
}
|
|
11898
|
-
setValue('batchIndex', index + 1, this.batchEditModule);
|
|
11899
|
-
}
|
|
11900
11983
|
if (this.parent.editSettings.mode === 'Row' || this.parent.editSettings.mode === 'Cell') {
|
|
11901
11984
|
const errors = this.parent.grid.getContentTable().querySelectorAll('.e-griderror');
|
|
11902
11985
|
for (let i = 0; i < errors.length; i++) {
|
|
@@ -12265,8 +12348,8 @@ class Edit$1 {
|
|
|
12265
12348
|
|| (this.parent.editSettings.mode === 'Batch' && e.args.requestType.toString() === 'batchsave'))) {
|
|
12266
12349
|
this.updateIndex(this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
|
|
12267
12350
|
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns) {
|
|
12268
|
-
if (this.parent.grid.dataSource.length === this.parent.
|
|
12269
|
-
this.updateIndex(this.parent.grid.dataSource, this.parent.
|
|
12351
|
+
if (this.parent.grid.dataSource.length === this.parent.getDataRows().length) {
|
|
12352
|
+
this.updateIndex(this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
|
|
12270
12353
|
}
|
|
12271
12354
|
}
|
|
12272
12355
|
}
|
|
@@ -12453,18 +12536,19 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12453
12536
|
return new TreeVirtualRowModelGenerator(this.parent);
|
|
12454
12537
|
}
|
|
12455
12538
|
getRowByIndex(index) {
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12539
|
+
if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
|
|
12540
|
+
return this.getRowCollection(index, true);
|
|
12541
|
+
}
|
|
12542
|
+
else {
|
|
12543
|
+
return this.parent.getDataRows().filter((e) => parseInt(e.getAttribute('data-rowindex'), 10) === index)[0];
|
|
12544
|
+
}
|
|
12460
12545
|
}
|
|
12461
12546
|
getFrozenRightVirtualRowByIndex(index) {
|
|
12462
12547
|
return this.getRowCollection(index, false, false, true);
|
|
12463
12548
|
}
|
|
12464
12549
|
getRowCollection(index, isMovable, isRowObject, isFrozenRight) {
|
|
12465
12550
|
const startIdx = parseInt(this.parent.getRows()[0].getAttribute(dataRowIndex), 10);
|
|
12466
|
-
|
|
12467
|
-
rowCollection = isFrozenRight ? this.parent.getFrozenRightDataRows() : rowCollection;
|
|
12551
|
+
const rowCollection = this.parent.getDataRows();
|
|
12468
12552
|
const collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
|
|
12469
12553
|
let selectedRow = collection[index - startIdx];
|
|
12470
12554
|
if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {
|
|
@@ -12517,8 +12601,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12517
12601
|
this.endIndex = this.parent.pageSettings.pageSize - 1;
|
|
12518
12602
|
}
|
|
12519
12603
|
if ((this.endIndex - this.startIndex !== this.parent.pageSettings.pageSize) &&
|
|
12520
|
-
(this.totalRecords > this.parent.pageSettings.pageSize)
|
|
12521
|
-
(this.endIndex === this.totalRecords)) {
|
|
12604
|
+
(this.totalRecords > this.parent.pageSettings.pageSize)
|
|
12605
|
+
&& (this.endIndex === this.totalRecords)) {
|
|
12522
12606
|
args.startIndex = this.endIndex - this.parent.pageSettings.pageSize;
|
|
12523
12607
|
args.endIndex = this.endIndex;
|
|
12524
12608
|
}
|
|
@@ -12914,29 +12998,16 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12914
12998
|
}
|
|
12915
12999
|
}
|
|
12916
13000
|
appendContent(target, newChild, e) {
|
|
12917
|
-
const isFrozen = this.parent.isFrozenGrid();
|
|
12918
13001
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
12919
13002
|
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || this.parent.isFrozenGrid()) {
|
|
12920
13003
|
if (getValue('isExpandCollapse', e)) {
|
|
12921
13004
|
this.isRemoteExpand = true;
|
|
12922
13005
|
}
|
|
12923
|
-
if (isFrozen && ((isNullOrUndefined(this.requestType) && getValue('requestTypes', this).indexOf('isFrozen') === -1) ||
|
|
12924
|
-
(this.parent.enableVirtualMaskRow && this.requestType === 'virtualscroll'))) {
|
|
12925
|
-
getValue('requestTypes', this).push('isFrozen');
|
|
12926
|
-
this.requestType = 'isFrozen';
|
|
12927
|
-
}
|
|
12928
13006
|
super.appendContent(target, newChild, e);
|
|
12929
13007
|
if (getValue('requestTypes', this).indexOf('isFrozen') !== -1) {
|
|
12930
13008
|
getValue('requestTypes', this).splice(getValue('requestTypes', this).indexOf('isFrozen'), 1);
|
|
12931
13009
|
this.requestType = this.requestType === 'isFrozen' ? undefined : this.requestType;
|
|
12932
13010
|
}
|
|
12933
|
-
if (isFrozen && (!this.isExpandCollapse || this.translateY === 0)) {
|
|
12934
|
-
this.translateY = this.translateY < 0 ? 0 : this.translateY;
|
|
12935
|
-
getValue('virtualEle', this).adjustTable(0, this.translateY);
|
|
12936
|
-
}
|
|
12937
|
-
else {
|
|
12938
|
-
this.isExpandCollapse = false;
|
|
12939
|
-
}
|
|
12940
13011
|
}
|
|
12941
13012
|
else {
|
|
12942
13013
|
const info = e.virtualInfo.sentinelInfo && e.virtualInfo.sentinelInfo.axis === 'Y' &&
|
|
@@ -13187,6 +13258,7 @@ class VirtualScroll$1 {
|
|
|
13187
13258
|
this.parent.grid.notify(indexModifier, counts);
|
|
13188
13259
|
let startIndex = counts.startIndex;
|
|
13189
13260
|
let endIndex = counts.endIndex;
|
|
13261
|
+
pageingDetails.count = visualData.length;
|
|
13190
13262
|
if (startIndex === -1 && endIndex === -1) {
|
|
13191
13263
|
let query = new Query();
|
|
13192
13264
|
const size = this.parent.grid.pageSettings.pageSize;
|
|
@@ -13205,7 +13277,7 @@ class VirtualScroll$1 {
|
|
|
13205
13277
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
13206
13278
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13207
13279
|
}
|
|
13208
|
-
if ((requestType === 'save' &&
|
|
13280
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13209
13281
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13210
13282
|
endIndex = counts.count;
|
|
13211
13283
|
this.parent['isAddedFromGantt'] = false;
|
|
@@ -13275,15 +13347,12 @@ class TreeVirtual extends VirtualScroll {
|
|
|
13275
13347
|
const parentGrid = getValue('parent', this);
|
|
13276
13348
|
getValue('parent', this).log(['limitation', 'virtual_height'], 'virtualization');
|
|
13277
13349
|
const renderer = getValue('locator', this).getService('rendererFactory');
|
|
13278
|
-
if (
|
|
13279
|
-
if (parentGrid.enableColumnVirtualization) {
|
|
13280
|
-
getValue('addRenderer', renderer)
|
|
13281
|
-
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
13282
|
-
}
|
|
13350
|
+
if (parentGrid.enableColumnVirtualization) {
|
|
13283
13351
|
getValue('addRenderer', renderer)
|
|
13284
|
-
.apply(renderer, [RenderType.
|
|
13352
|
+
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
13285
13353
|
}
|
|
13286
|
-
|
|
13354
|
+
getValue('addRenderer', renderer)
|
|
13355
|
+
.apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
13287
13356
|
this.ensurePageSize();
|
|
13288
13357
|
}
|
|
13289
13358
|
ensurePageSize() {
|
|
@@ -13301,138 +13370,6 @@ class TreeVirtual extends VirtualScroll {
|
|
|
13301
13370
|
}
|
|
13302
13371
|
}
|
|
13303
13372
|
|
|
13304
|
-
/**
|
|
13305
|
-
* VirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
13306
|
-
*
|
|
13307
|
-
* @hidden
|
|
13308
|
-
*/
|
|
13309
|
-
class VirtualTreeFreezeRenderer extends VirtualFreezeRenderer {
|
|
13310
|
-
constructor(parent, locator) {
|
|
13311
|
-
super(parent, locator);
|
|
13312
|
-
this.addEventListener();
|
|
13313
|
-
}
|
|
13314
|
-
/**
|
|
13315
|
-
* @returns {void}
|
|
13316
|
-
* @hidden
|
|
13317
|
-
*/
|
|
13318
|
-
renderTable() {
|
|
13319
|
-
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13320
|
-
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13321
|
-
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13322
|
-
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13323
|
-
FreezeContentRender.prototype.renderTable.call(this);
|
|
13324
|
-
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13325
|
-
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13326
|
-
const movableCont = this.getMovableContent();
|
|
13327
|
-
const minHeight = this.parent.height;
|
|
13328
|
-
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13329
|
-
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13330
|
-
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13331
|
-
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13332
|
-
if (this.parent.enableColumnVirtualization) {
|
|
13333
|
-
this.virtualRenderer.virtualEle.movableContent = this.virtualRenderer.movableContent
|
|
13334
|
-
= this.getPanel().querySelector('.' + movableContent);
|
|
13335
|
-
this.virtualRenderer.virtualEle.renderMovableWrapper(minHeight);
|
|
13336
|
-
this.virtualRenderer.virtualEle.renderMovablePlaceHolder();
|
|
13337
|
-
const tbl = movableCont.querySelector('table');
|
|
13338
|
-
this.virtualRenderer.virtualEle.movableTable = tbl;
|
|
13339
|
-
this.virtualRenderer.virtualEle.movableWrapper.appendChild(tbl);
|
|
13340
|
-
movableCont.appendChild(this.virtualRenderer.virtualEle.movableWrapper);
|
|
13341
|
-
movableCont.appendChild(this.virtualRenderer.virtualEle.movablePlaceholder);
|
|
13342
|
-
}
|
|
13343
|
-
this.virtualRenderer.virtualEle.wrapper.appendChild(this.getFrozenContent());
|
|
13344
|
-
this.virtualRenderer.virtualEle.wrapper.appendChild(movableCont);
|
|
13345
|
-
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13346
|
-
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13347
|
-
}
|
|
13348
|
-
/**
|
|
13349
|
-
* @param {HTMLElement} target - specifies the target
|
|
13350
|
-
* @param {DocumentFragment} newChild - specifies the newChild
|
|
13351
|
-
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13352
|
-
* @returns {void}
|
|
13353
|
-
* @hidden
|
|
13354
|
-
*/
|
|
13355
|
-
appendContent(target, newChild, e) {
|
|
13356
|
-
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13357
|
-
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13358
|
-
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13359
|
-
super.appendContent(target, newChild, e);
|
|
13360
|
-
}
|
|
13361
|
-
/**
|
|
13362
|
-
* @param {Object[]} data - specifies the data
|
|
13363
|
-
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13364
|
-
* @returns {Row<Column>[]} returns the row
|
|
13365
|
-
* @hidden
|
|
13366
|
-
*/
|
|
13367
|
-
generateRows(data, e) {
|
|
13368
|
-
return super.generateRows(data, e);
|
|
13369
|
-
}
|
|
13370
|
-
}
|
|
13371
|
-
/**
|
|
13372
|
-
* ColumnVirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
13373
|
-
*
|
|
13374
|
-
* @hidden
|
|
13375
|
-
*/
|
|
13376
|
-
class ColumnVirtualTreeFreezeRenderer extends ColumnVirtualFreezeRenderer {
|
|
13377
|
-
constructor(parent, locator) {
|
|
13378
|
-
super(parent, locator);
|
|
13379
|
-
this.serviceLoc = locator;
|
|
13380
|
-
this.eventListener('on');
|
|
13381
|
-
}
|
|
13382
|
-
/**
|
|
13383
|
-
* @returns {void}
|
|
13384
|
-
* @hidden
|
|
13385
|
-
*/
|
|
13386
|
-
renderTable() {
|
|
13387
|
-
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13388
|
-
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13389
|
-
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13390
|
-
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13391
|
-
ColumnFreezeContentRenderer.prototype.renderTable.call(this);
|
|
13392
|
-
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13393
|
-
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13394
|
-
const frozenRightCont = this.getFrozenRightContent();
|
|
13395
|
-
let frzCont = this.getFrozenContent();
|
|
13396
|
-
const movableCont = this.getMovableContent();
|
|
13397
|
-
if (this.parent.getFrozenMode() === 'Right') {
|
|
13398
|
-
frzCont = frozenRightCont;
|
|
13399
|
-
}
|
|
13400
|
-
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13401
|
-
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13402
|
-
const minHeight = this.parent.height;
|
|
13403
|
-
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13404
|
-
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13405
|
-
super['renderVirtualFrozenLeft'](frzCont, movableCont);
|
|
13406
|
-
super['renderVirtualFrozenRight'](frzCont, movableCont);
|
|
13407
|
-
super['renderVirtualFrozenLeftRight'](frzCont, movableCont, frozenRightCont);
|
|
13408
|
-
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13409
|
-
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13410
|
-
}
|
|
13411
|
-
appendContent(target, newChild, e) {
|
|
13412
|
-
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13413
|
-
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13414
|
-
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13415
|
-
super.appendContent(target, newChild, e);
|
|
13416
|
-
}
|
|
13417
|
-
}
|
|
13418
|
-
/**
|
|
13419
|
-
* VirtualTreeFreezeHdrRenderer is used to render the virtual table within the frozen and movable header table
|
|
13420
|
-
*
|
|
13421
|
-
* @hidden
|
|
13422
|
-
*/
|
|
13423
|
-
class VirtualTreeFreezeHdrRenderer extends VirtualFreezeHdrRenderer {
|
|
13424
|
-
/**
|
|
13425
|
-
* @returns {void}
|
|
13426
|
-
* @hidden
|
|
13427
|
-
*/
|
|
13428
|
-
renderTable() {
|
|
13429
|
-
super.renderTable();
|
|
13430
|
-
}
|
|
13431
|
-
rfshMovable() {
|
|
13432
|
-
super.rfshMovable();
|
|
13433
|
-
}
|
|
13434
|
-
}
|
|
13435
|
-
|
|
13436
13373
|
/**
|
|
13437
13374
|
* TreeGrid Freeze module
|
|
13438
13375
|
*
|
|
@@ -13453,7 +13390,6 @@ class Freeze$1 {
|
|
|
13453
13390
|
this.parent.on('rowExpandCollapse', this.rowExpandCollapse, this);
|
|
13454
13391
|
this.parent.on('dataBoundArg', this.dataBoundArg, this);
|
|
13455
13392
|
this.parent.grid.on('dblclick', this.dblClickHandler, this);
|
|
13456
|
-
this.parent.grid.on('initial-load', this.instantiateRenderer, this);
|
|
13457
13393
|
}
|
|
13458
13394
|
removeEventListener() {
|
|
13459
13395
|
if (this.parent.isDestroyed) {
|
|
@@ -13462,46 +13398,16 @@ class Freeze$1 {
|
|
|
13462
13398
|
this.parent.off('rowExpandCollapse', this.rowExpandCollapse);
|
|
13463
13399
|
this.parent.off('dataBoundArg', this.dataBoundArg);
|
|
13464
13400
|
this.parent.grid.off('dblclick', this.dblClickHandler);
|
|
13465
|
-
this.parent.grid.off('initial-load', this.instantiateRenderer);
|
|
13466
|
-
}
|
|
13467
|
-
instantiateRenderer() {
|
|
13468
|
-
const renderer = getValue('serviceLocator', this.parent.grid).getService('rendererFactory');
|
|
13469
|
-
if (this.parent.getFrozenColumns()) {
|
|
13470
|
-
if (this.parent.enableColumnVirtualization) {
|
|
13471
|
-
getValue('addRenderer', renderer)
|
|
13472
|
-
.apply(renderer, [RenderType.Header, new VirtualTreeFreezeHdrRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13473
|
-
}
|
|
13474
|
-
else {
|
|
13475
|
-
getValue('addRenderer', renderer)
|
|
13476
|
-
.apply(renderer, [RenderType.Header, new FreezeRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13477
|
-
}
|
|
13478
|
-
if (this.parent.enableVirtualization) {
|
|
13479
|
-
getValue('addRenderer', renderer)
|
|
13480
|
-
.apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13481
|
-
}
|
|
13482
|
-
}
|
|
13483
|
-
if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
|
|
13484
|
-
getValue('addRenderer', renderer)
|
|
13485
|
-
.apply(renderer, [RenderType.Header, new ColumnFreezeHeaderRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13486
|
-
if (this.parent.enableVirtualization) {
|
|
13487
|
-
getValue('addRenderer', renderer)
|
|
13488
|
-
.apply(renderer, [RenderType.Content, new ColumnVirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13489
|
-
}
|
|
13490
|
-
else {
|
|
13491
|
-
getValue('addRenderer', renderer)
|
|
13492
|
-
.apply(renderer, [RenderType.Content, new ColumnFreezeContentRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13493
|
-
}
|
|
13494
|
-
}
|
|
13495
13401
|
}
|
|
13496
13402
|
rowExpandCollapse(args) {
|
|
13497
|
-
const movableRows = this.parent.
|
|
13403
|
+
const movableRows = this.parent.getDataRows();
|
|
13498
13404
|
const frozenrows = this.parent.getRows();
|
|
13499
13405
|
let rows;
|
|
13500
13406
|
let frozenRightRows;
|
|
13501
13407
|
const freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
13502
13408
|
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
13503
13409
|
if (freeze) {
|
|
13504
|
-
frozenRightRows = this.parent.
|
|
13410
|
+
frozenRightRows = this.parent.getRows().filter((e) => e.querySelector('.e-gridrowindex' + args.record.index + 'level' + (args.record.level + 1)));
|
|
13505
13411
|
}
|
|
13506
13412
|
if (!args.detailrows.length) {
|
|
13507
13413
|
rows = movableRows.filter((e) => e.querySelector('.e-gridrowindex' + args.record.index + 'level' + (args.record.level + 1)));
|
|
@@ -13706,7 +13612,7 @@ class InfiniteScroll$1 {
|
|
|
13706
13612
|
const updateIndex = 'updateIndex';
|
|
13707
13613
|
this.parent.editModule[`${updateIndex}`](this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
|
|
13708
13614
|
if (this.parent.getFrozenColumns()) {
|
|
13709
|
-
this.parent.editModule[`${updateIndex}`](this.parent.grid.dataSource, this.parent.
|
|
13615
|
+
this.parent.editModule[`${updateIndex}`](this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
|
|
13710
13616
|
}
|
|
13711
13617
|
}
|
|
13712
13618
|
}
|
|
@@ -13826,8 +13732,8 @@ class InfiniteScroll$1 {
|
|
|
13826
13732
|
const keyField = this.parent.grid.getPrimaryKeyFieldNames()[0];
|
|
13827
13733
|
this.removeRows(rowElms, rows, data, keyField, true);
|
|
13828
13734
|
if (this.parent.getFrozenColumns() > 0) {
|
|
13829
|
-
const mRows = this.parent.grid.
|
|
13830
|
-
const mRowElms = this.parent.grid.
|
|
13735
|
+
const mRows = this.parent.grid.getRowsObject();
|
|
13736
|
+
const mRowElms = this.parent.grid.getRows();
|
|
13831
13737
|
this.removeRows(mRowElms, mRows, data, keyField);
|
|
13832
13738
|
}
|
|
13833
13739
|
}
|
|
@@ -13869,23 +13775,23 @@ class InfiniteScroll$1 {
|
|
|
13869
13775
|
const rowRenderer = new RowRenderer(serviceLocator, null, this.parent.grid);
|
|
13870
13776
|
let tbody;
|
|
13871
13777
|
const currentData = this.parent.getCurrentViewRecords();
|
|
13872
|
-
const currentRows = eventArgs.isMovable ? this.parent.grid.
|
|
13778
|
+
const currentRows = eventArgs.isMovable ? this.parent.grid.getRows()
|
|
13873
13779
|
: this.parent.grid.getDataRows();
|
|
13874
13780
|
if (eventArgs.isFrozenRight) {
|
|
13875
13781
|
tbody = this.parent.element.querySelector('.e-frozen-right-content').querySelector('tbody');
|
|
13876
13782
|
}
|
|
13877
13783
|
else {
|
|
13878
13784
|
tbody = !this.parent.grid.isFrozenGrid() ? this.parent.getContent().querySelector('tbody') : eventArgs.isMovable
|
|
13879
|
-
? this.parent.grid.
|
|
13880
|
-
: this.parent.grid.
|
|
13785
|
+
? this.parent.grid.getContent().querySelector('tbody')
|
|
13786
|
+
: this.parent.grid.getContent().querySelector('tbody');
|
|
13881
13787
|
}
|
|
13882
13788
|
if (this.parent.frozenRows) {
|
|
13883
13789
|
tbody = eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType !== 'add'
|
|
13884
13790
|
|| !eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType === 'add'
|
|
13885
13791
|
? !this.parent.grid.isFrozenGrid() ? this.parent.getHeaderContent().querySelector('tbody')
|
|
13886
|
-
: eventArgs.isMovable ? this.parent.grid.
|
|
13792
|
+
: eventArgs.isMovable ? this.parent.grid.getHeaderContent().querySelector('tbody')
|
|
13887
13793
|
: eventArgs.isFrozenRight ? this.parent.element.querySelector('.e-frozen-right-header').querySelector('tbody')
|
|
13888
|
-
: this.parent.grid.
|
|
13794
|
+
: this.parent.grid.getHeaderContent().querySelector('tbody') : tbody;
|
|
13889
13795
|
}
|
|
13890
13796
|
let position;
|
|
13891
13797
|
const addRowIndex = 'addRowIndex';
|