@syncfusion/ej2-treegrid 28.1.35 → 28.1.36
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 +1 -10
- package/dist/ej2-treegrid.umd.min.js +1 -10
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +34 -5
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +34 -5
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +1 -10
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +6 -7
- package/src/treegrid/base/treegrid.js +28 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +6 -4
- package/styles/bds-lite.css +16 -12
- package/styles/bds.css +16 -12
- package/styles/bootstrap-dark-lite.css +23 -16
- package/styles/bootstrap-dark.css +23 -16
- package/styles/bootstrap-lite.css +34 -15
- package/styles/bootstrap.css +34 -15
- package/styles/bootstrap4-lite.css +23 -16
- package/styles/bootstrap4.css +23 -16
- package/styles/bootstrap5-dark-lite.css +23 -16
- package/styles/bootstrap5-dark.css +23 -16
- package/styles/bootstrap5-lite.css +23 -16
- package/styles/bootstrap5.3-lite.css +23 -16
- package/styles/bootstrap5.3.css +23 -16
- package/styles/bootstrap5.css +23 -16
- package/styles/fabric-dark-lite.css +23 -16
- package/styles/fabric-dark.css +23 -16
- package/styles/fabric-lite.css +23 -16
- package/styles/fabric.css +23 -16
- package/styles/fluent-dark-lite.css +23 -16
- package/styles/fluent-dark.css +23 -16
- package/styles/fluent-lite.css +23 -16
- package/styles/fluent.css +23 -16
- package/styles/fluent2-lite.css +23 -16
- package/styles/fluent2.css +23 -16
- package/styles/highcontrast-light-lite.css +23 -16
- package/styles/highcontrast-light.css +23 -16
- package/styles/highcontrast-lite.css +23 -16
- package/styles/highcontrast.css +23 -16
- package/styles/material-dark-lite.css +23 -16
- package/styles/material-dark.css +23 -16
- package/styles/material-lite.css +23 -16
- package/styles/material.css +23 -16
- package/styles/material3-dark-lite.css +23 -16
- package/styles/material3-dark.css +23 -16
- package/styles/material3-lite.css +23 -16
- package/styles/material3.css +23 -16
- package/styles/tailwind-dark-lite.css +23 -16
- package/styles/tailwind-dark.css +23 -16
- package/styles/tailwind-lite.css +23 -16
- package/styles/tailwind.css +23 -16
- package/styles/tailwind3-lite.css +23 -16
- package/styles/tailwind3.css +23 -16
- package/styles/treegrid/_icons.scss +8 -5
- package/styles/treegrid/_layout.scss +17 -13
- package/styles/treegrid/bds.css +16 -12
- package/styles/treegrid/bootstrap-dark.css +23 -16
- package/styles/treegrid/bootstrap.css +34 -15
- package/styles/treegrid/bootstrap4.css +23 -16
- package/styles/treegrid/bootstrap5-dark.css +23 -16
- package/styles/treegrid/bootstrap5.3.css +23 -16
- package/styles/treegrid/bootstrap5.css +23 -16
- package/styles/treegrid/fabric-dark.css +23 -16
- package/styles/treegrid/fabric.css +23 -16
- package/styles/treegrid/fluent-dark.css +23 -16
- package/styles/treegrid/fluent.css +23 -16
- package/styles/treegrid/fluent2.css +23 -16
- package/styles/treegrid/highcontrast-light.css +23 -16
- package/styles/treegrid/highcontrast.css +23 -16
- package/styles/treegrid/icons/_bootstrap-dark.scss +8 -5
- package/styles/treegrid/icons/_bootstrap.scss +24 -4
- package/styles/treegrid/icons/_bootstrap4.scss +8 -5
- package/styles/treegrid/icons/_bootstrap5.3.scss +8 -5
- package/styles/treegrid/icons/_bootstrap5.scss +8 -5
- package/styles/treegrid/icons/_fabric-dark.scss +8 -5
- package/styles/treegrid/icons/_fabric.scss +8 -5
- package/styles/treegrid/icons/_fluent.scss +8 -5
- package/styles/treegrid/icons/_fluent2.scss +8 -5
- package/styles/treegrid/icons/_fusionnew.scss +8 -5
- package/styles/treegrid/icons/_highcontrast-light.scss +8 -5
- package/styles/treegrid/icons/_highcontrast.scss +8 -5
- package/styles/treegrid/icons/_material-dark.scss +8 -5
- package/styles/treegrid/icons/_material.scss +8 -5
- package/styles/treegrid/icons/_material3.scss +8 -5
- package/styles/treegrid/icons/_tailwind-dark.scss +9 -6
- package/styles/treegrid/icons/_tailwind.scss +8 -5
- package/styles/treegrid/icons/_tailwind3.scss +8 -5
- package/styles/treegrid/material-dark.css +23 -16
- package/styles/treegrid/material.css +23 -16
- package/styles/treegrid/material3-dark.css +23 -16
- package/styles/treegrid/material3.css +23 -16
- package/styles/treegrid/tailwind-dark.css +23 -16
- package/styles/treegrid/tailwind.css +23 -16
- package/styles/treegrid/tailwind3.css +23 -16
|
@@ -4010,8 +4010,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4010
4010
|
const freezePresent = this.injectedModules.filter((e) => {
|
|
4011
4011
|
return e.prototype.getModuleName() === 'freeze';
|
|
4012
4012
|
});
|
|
4013
|
+
const hasFreezeProp = Array.isArray(this.columns) &&
|
|
4014
|
+
this.columns.some((col) => !!col.freeze);
|
|
4013
4015
|
if ((this.frozenColumns || this.frozenRows || this.getFrozenColumns() ||
|
|
4014
|
-
|
|
4016
|
+
hasFreezeProp) && freezePresent.length > 0) {
|
|
4015
4017
|
modules.push({
|
|
4016
4018
|
member: 'freeze', args: [this],
|
|
4017
4019
|
name: 'Freeze'
|
|
@@ -6394,6 +6396,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6394
6396
|
}
|
|
6395
6397
|
// Internal method to handle the rows expand
|
|
6396
6398
|
expandRows(row, record, parentRec) {
|
|
6399
|
+
const initialTotalRecordsCount = this.grid.totalDataRecordsCount;
|
|
6397
6400
|
this.expandCollapse('expand', row, record);
|
|
6398
6401
|
const children = 'Children';
|
|
6399
6402
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record[`${children}`]))) {
|
|
@@ -6414,6 +6417,18 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6414
6417
|
this.trigger(expanded, expandArgs);
|
|
6415
6418
|
}
|
|
6416
6419
|
}
|
|
6420
|
+
if (this.enableVirtualization) {
|
|
6421
|
+
const index = this.grid.currentViewData.indexOf(record);
|
|
6422
|
+
const expandedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
|
|
6423
|
+
if (!isNullOrUndefined(expandedRow)) {
|
|
6424
|
+
const rowIndex = +expandedRow.getAttribute('data-rowindex');
|
|
6425
|
+
const outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
|
|
6426
|
+
const lastBlockIdx = initialTotalRecordsCount - outBuffer;
|
|
6427
|
+
if (rowIndex > lastBlockIdx) {
|
|
6428
|
+
this.grid.getContent().firstElementChild.scrollTop = rowIndex * this.grid.getRowHeight();
|
|
6429
|
+
}
|
|
6430
|
+
}
|
|
6431
|
+
}
|
|
6417
6432
|
}
|
|
6418
6433
|
expandCollapseAllChildren(record, action, key, level) {
|
|
6419
6434
|
if ((!isNullOrUndefined(key) && record[this.getPrimaryKeyFieldNames()[0]] !== key) ||
|
|
@@ -6528,6 +6543,18 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6528
6543
|
this.grid.getContent().firstElementChild.scrollBy(0, this.grid.getRowHeight());
|
|
6529
6544
|
}
|
|
6530
6545
|
}
|
|
6546
|
+
if (this.enableVirtualization) {
|
|
6547
|
+
const index = this.grid.currentViewData.indexOf(record);
|
|
6548
|
+
const collapsedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
|
|
6549
|
+
if (!isNullOrUndefined(collapsedRow)) {
|
|
6550
|
+
const rowIndex = +collapsedRow.getAttribute('data-rowindex');
|
|
6551
|
+
const outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
|
|
6552
|
+
const lastBlockIdx = this.grid.totalDataRecordsCount - outBuffer;
|
|
6553
|
+
if (rowIndex > lastBlockIdx) {
|
|
6554
|
+
this.grid.getContent().firstElementChild.scrollBy(0, (rowIndex - lastBlockIdx) * this.grid.getRowHeight());
|
|
6555
|
+
}
|
|
6556
|
+
}
|
|
6557
|
+
}
|
|
6531
6558
|
}
|
|
6532
6559
|
}
|
|
6533
6560
|
updateExpandStateMapping(record, state) {
|
|
@@ -13402,7 +13429,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13402
13429
|
dataBoundEvent() {
|
|
13403
13430
|
const dataBoundEve = 'dataBound';
|
|
13404
13431
|
const initialRowTop = 'initialRowTop';
|
|
13405
|
-
if (this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this[`${initialRowTop}`]) {
|
|
13432
|
+
if (!isNullOrUndefined(this.parent.getRows()) && this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this[`${initialRowTop}`]) {
|
|
13406
13433
|
const rowTop = this.parent.getRowByIndex(0).getBoundingClientRect().top;
|
|
13407
13434
|
const gridTop = this.parent.element.getBoundingClientRect().top;
|
|
13408
13435
|
if (rowTop > 0) {
|
|
@@ -13593,7 +13620,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13593
13620
|
content = this.parent.getContent().querySelector('.e-content');
|
|
13594
13621
|
}
|
|
13595
13622
|
const scrollHeight = outBuffer * rowHeight;
|
|
13596
|
-
const upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
13623
|
+
const upScroll = (scrollArgs.offset.top - this.translateY) < 0 && this.activeKey !== 'downArrow';
|
|
13597
13624
|
const downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
13598
13625
|
const selectedRowIndex = 'selectedRowIndex';
|
|
13599
13626
|
const currentViewData = this.parent.currentViewData;
|
|
@@ -13618,7 +13645,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13618
13645
|
this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
|
|
13619
13646
|
}
|
|
13620
13647
|
if (currentViewData.length && (currentViewData[0][`${indexValue}`] >= this.parent.pageSettings.pageSize / 2) &&
|
|
13621
|
-
((currentViewData[0][`${indexValue}`] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13648
|
+
((currentViewData[0][`${indexValue}`] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13649
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
13622
13650
|
this.startIndex = currentViewData[0][`${indexValue}`] - (this.parent.pageSettings.pageSize / 2);
|
|
13623
13651
|
this.endIndex = this.startIndex + this.parent.pageSettings.pageSize;
|
|
13624
13652
|
}
|
|
@@ -13675,7 +13703,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13675
13703
|
this.startIndex = lastIndex - (this.parent.pageSettings.pageSize / 2);
|
|
13676
13704
|
}
|
|
13677
13705
|
if (currentViewData.length && this.startIndex > currentViewData[0][`${indexValue}`] &&
|
|
13678
|
-
((this.startIndex - currentViewData[0][`${indexValue}`]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13706
|
+
((this.startIndex - currentViewData[0][`${indexValue}`]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13707
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
13679
13708
|
this.startIndex = currentViewData[0][`${indexValue}`] + (this.parent.pageSettings.pageSize / 2);
|
|
13680
13709
|
}
|
|
13681
13710
|
if (this.parent.root.isSelfReference) {
|