@syncfusion/ej2-treegrid 27.1.57 → 27.2.2
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 +34 -13
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +34 -13
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/treegrid/actions/edit.d.ts +8 -0
- package/src/treegrid/actions/edit.js +17 -1
- package/src/treegrid/base/treegrid.js +4 -6
- package/src/treegrid/renderer/render.js +1 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +12 -5
- package/styles/bootstrap-dark-lite.css +1 -1
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap-lite.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4-lite.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark-lite.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5-lite.css +1 -1
- package/styles/bootstrap5.3-lite.css +1 -1
- package/styles/bootstrap5.3.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark-lite.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric-lite.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark-lite.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent-lite.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/fluent2-lite.css +2 -3
- package/styles/fluent2.css +2 -3
- package/styles/highcontrast-light-lite.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast-lite.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark-lite.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material-lite.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark-lite.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3-lite.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/tailwind-dark-lite.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind-lite.css +1 -1
- package/styles/tailwind.css +1 -1
- package/styles/treegrid/_layout.scss +1 -1
- package/styles/treegrid/bootstrap-dark.css +1 -1
- package/styles/treegrid/bootstrap.css +1 -1
- package/styles/treegrid/bootstrap4.css +1 -1
- package/styles/treegrid/bootstrap5-dark.css +1 -1
- package/styles/treegrid/bootstrap5.3.css +1 -1
- package/styles/treegrid/bootstrap5.css +1 -1
- package/styles/treegrid/fabric-dark.css +1 -1
- package/styles/treegrid/fabric.css +1 -1
- package/styles/treegrid/fluent-dark.css +1 -1
- package/styles/treegrid/fluent.css +1 -1
- package/styles/treegrid/fluent2.css +2 -3
- package/styles/treegrid/highcontrast-light.css +1 -1
- package/styles/treegrid/highcontrast.css +1 -1
- package/styles/treegrid/material-dark.css +1 -1
- package/styles/treegrid/material.css +1 -1
- package/styles/treegrid/material3-dark.css +1 -1
- package/styles/treegrid/material3.css +1 -1
- package/styles/treegrid/tailwind-dark.css +1 -1
- package/styles/treegrid/tailwind.css +1 -1
|
@@ -1854,7 +1854,7 @@ class Render {
|
|
|
1854
1854
|
const cellRenderer = new CellRenderer(this.parent.grid, this.parent.grid.serviceLocator);
|
|
1855
1855
|
const td = rows.length >= rowsObj.length
|
|
1856
1856
|
? this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent)
|
|
1857
|
-
:
|
|
1857
|
+
: rows[rowsObj[parseInt(j.toString(), 10)].index].querySelector('.e-templatecell');
|
|
1858
1858
|
cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)][`${rowIdx}`] });
|
|
1859
1859
|
const treecell = this.parent.getRows()[parseInt(j.toString(), 10)]
|
|
1860
1860
|
.cells[parseInt(cellIndex.toString(), 10)];
|
|
@@ -4428,10 +4428,6 @@ 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 (!isNullOrUndefined(this.selectionSettings) && !this.selectionSettings.persistSelection &&
|
|
4432
|
-
this.enableVirtualization && args.rowIndex === this.selectedRowIndex && this.isGantt) {
|
|
4433
|
-
args.cancel = false;
|
|
4434
|
-
}
|
|
4435
4431
|
this.trigger(rowSelecting, args);
|
|
4436
4432
|
};
|
|
4437
4433
|
this.grid.rowDeselecting = (args) => {
|
|
@@ -5596,7 +5592,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5596
5592
|
*/
|
|
5597
5593
|
closeEdit() {
|
|
5598
5594
|
if (this.grid.editModule) {
|
|
5599
|
-
this.
|
|
5595
|
+
this.editModule['closeEdit']();
|
|
5600
5596
|
}
|
|
5601
5597
|
}
|
|
5602
5598
|
/**
|
|
@@ -7272,7 +7268,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7272
7268
|
* @returns {void}
|
|
7273
7269
|
*/
|
|
7274
7270
|
clearSelection() {
|
|
7275
|
-
this.grid.selectionModule
|
|
7271
|
+
if (!isNullOrUndefined(this.grid.selectionModule)) {
|
|
7272
|
+
this.grid.selectionModule['actualTarget'] = null;
|
|
7273
|
+
}
|
|
7276
7274
|
this.grid.clearSelection();
|
|
7277
7275
|
}
|
|
7278
7276
|
/**
|
|
@@ -11971,7 +11969,7 @@ class Edit {
|
|
|
11971
11969
|
this.recordDoubleClick(args);
|
|
11972
11970
|
}
|
|
11973
11971
|
if (args.action === 'escape') {
|
|
11974
|
-
this.
|
|
11972
|
+
this.closeEdit();
|
|
11975
11973
|
}
|
|
11976
11974
|
}
|
|
11977
11975
|
deleteUniqueID(value) {
|
|
@@ -12038,6 +12036,9 @@ class Edit {
|
|
|
12038
12036
|
batchCancel() {
|
|
12039
12037
|
if (this.parent.editSettings.mode === 'Cell') {
|
|
12040
12038
|
const cellDetails = getValue('editModule.cellDetails', this.parent.grid.editModule);
|
|
12039
|
+
if (!isNullOrUndefined(this.editedRowIndex)) {
|
|
12040
|
+
cellDetails.rowIndex = this.editedRowIndex;
|
|
12041
|
+
}
|
|
12041
12042
|
const treeCell = this.parent.getCellFromIndex(cellDetails.rowIndex, this.parent.treeColumnIndex);
|
|
12042
12043
|
this.parent.renderModule.cellRender({
|
|
12043
12044
|
data: cellDetails.rowData,
|
|
@@ -12358,6 +12359,7 @@ class Edit {
|
|
|
12358
12359
|
this.prevAriaRowIndex = '-1';
|
|
12359
12360
|
}
|
|
12360
12361
|
if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
12362
|
+
this.isScrollByFocus = true;
|
|
12361
12363
|
focussedElement.focus();
|
|
12362
12364
|
}
|
|
12363
12365
|
if (this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
@@ -12737,6 +12739,18 @@ class Edit {
|
|
|
12737
12739
|
this.parent.grid.editModule.editCell(rowIndex, field);
|
|
12738
12740
|
}
|
|
12739
12741
|
}
|
|
12742
|
+
/**
|
|
12743
|
+
* Cancels edited state.
|
|
12744
|
+
*
|
|
12745
|
+
* @returns {void}
|
|
12746
|
+
*/
|
|
12747
|
+
closeEdit() {
|
|
12748
|
+
if (this.parent.enableVirtualization && this.parent.grid.editSettings.mode === 'Batch' && this.parent.grid.pageSettings.currentPage > 1) {
|
|
12749
|
+
this.editedRowIndex = this.parent.grid.editModule.editModule['cellDetails'].rowIndex;
|
|
12750
|
+
this.parent.grid.editModule.editModule['cellDetails'].rowIndex = parseInt(this.parent.getRows()[this.parent.grid.editModule.editModule['cellDetails'].rowIndex].getAttribute('data-rowIndex'), 10);
|
|
12751
|
+
}
|
|
12752
|
+
this.parent.grid.editModule.closeEdit();
|
|
12753
|
+
}
|
|
12740
12754
|
}
|
|
12741
12755
|
|
|
12742
12756
|
/**
|
|
@@ -12908,9 +12922,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12908
12922
|
if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
|
|
12909
12923
|
return this.getRowCollection(index, true);
|
|
12910
12924
|
}
|
|
12911
|
-
|
|
12912
|
-
|
|
12925
|
+
const dataRows = this.parent.getDataRows();
|
|
12926
|
+
const targetRow = dataRows.find((e) => parseInt(e.getAttribute('data-rowindex'), 10) === index);
|
|
12927
|
+
if (!targetRow && this.parent.isEdit && this.parent.editSettings.mode === 'Batch') {
|
|
12928
|
+
return index != null ? this.parent.getRows()[parseInt(index.toString(), 10)] : undefined;
|
|
12913
12929
|
}
|
|
12930
|
+
return targetRow;
|
|
12914
12931
|
}
|
|
12915
12932
|
getFrozenRightVirtualRowByIndex(index) {
|
|
12916
12933
|
return this.getRowCollection(index, false, false, true);
|
|
@@ -13281,8 +13298,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13281
13298
|
- this.parent.pageSettings.pageSize;
|
|
13282
13299
|
index = (index > 0) ? index : 0;
|
|
13283
13300
|
if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 && index !== this[`${selectedRowIndex}`] &&
|
|
13284
|
-
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)
|
|
13285
|
-
!(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
|
|
13301
|
+
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
|
|
13286
13302
|
index = this[`${selectedRowIndex}`];
|
|
13287
13303
|
}
|
|
13288
13304
|
this.startIndex = index;
|
|
@@ -13327,7 +13343,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13327
13343
|
let nextSetResIndex = ~~(content.scrollTop / rowHeight);
|
|
13328
13344
|
const isLastBlock = (this[`${selectedRowIndex}`] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
|
|
13329
13345
|
if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 &&
|
|
13330
|
-
nextSetResIndex !== this[`${selectedRowIndex}`] && !isLastBlock
|
|
13346
|
+
nextSetResIndex !== this[`${selectedRowIndex}`] && !isLastBlock) {
|
|
13331
13347
|
nextSetResIndex = this[`${selectedRowIndex}`];
|
|
13332
13348
|
}
|
|
13333
13349
|
let lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;
|
|
@@ -13509,7 +13525,12 @@ class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
13509
13525
|
const debounced100 = debounce(callback, delay);
|
|
13510
13526
|
const debounced50 = debounce(callback, 50);
|
|
13511
13527
|
this[`${options}`].prevTop = this[`${options}`].prevLeft = 0;
|
|
13528
|
+
const isScrollByFocus = 'isScrollByFocus';
|
|
13512
13529
|
return (e) => {
|
|
13530
|
+
if (instance.isEdit && instance.root.editModule[`${isScrollByFocus}`]) {
|
|
13531
|
+
instance.root.editModule[`${isScrollByFocus}`] = false;
|
|
13532
|
+
return;
|
|
13533
|
+
}
|
|
13513
13534
|
const top = this[`${options}`].movableContainer ? this[`${options}`].container.scrollTop : e.target.scrollTop;
|
|
13514
13535
|
const left = this[`${options}`].movableContainer ? this[`${options}`].scrollbar.scrollLeft : e.target.scrollLeft;
|
|
13515
13536
|
let direction = this[`${options}`].prevTop < top ? 'down' : 'up';
|