@syncfusion/ej2-treegrid 20.3.47 → 20.3.49
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 +17 -1
- package/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +51 -17
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +51 -17
- 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 +8 -8
- package/src/treegrid/actions/edit.js +10 -1
- package/src/treegrid/actions/rowdragdrop.js +12 -2
- package/src/treegrid/base/treegrid.js +2 -2
- package/src/treegrid/renderer/render.js +5 -1
- package/src/treegrid/renderer/virtual-row-model-generator.js +5 -1
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +1 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +17 -10
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/treegrid/_layout.scss +1 -1
- package/styles/treegrid/bootstrap5-dark.css +1 -1
- package/styles/treegrid/bootstrap5.css +1 -1
- package/styles/treegrid/fluent-dark.css +1 -1
- package/styles/treegrid/fluent.css +1 -1
|
@@ -1644,7 +1644,11 @@ class Render {
|
|
|
1644
1644
|
args.cell.querySelector('.e-treecell').innerHTML = summaryData;
|
|
1645
1645
|
}
|
|
1646
1646
|
else {
|
|
1647
|
-
args.
|
|
1647
|
+
if (args.column.template) {
|
|
1648
|
+
args.cell.innerHTML = null;
|
|
1649
|
+
}
|
|
1650
|
+
else
|
|
1651
|
+
args.cell.innerHTML = summaryData;
|
|
1648
1652
|
}
|
|
1649
1653
|
}
|
|
1650
1654
|
if (isNullOrUndefined(this.parent.rowTemplate)) {
|
|
@@ -3726,12 +3730,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3726
3730
|
this.trigger(getObject('name', args), args);
|
|
3727
3731
|
}
|
|
3728
3732
|
IsExpandCollapseClicked(args) {
|
|
3729
|
-
if (args['name'] ===
|
|
3733
|
+
if (args['name'] === 'rowSelecting' && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
3730
3734
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')) && (isNullOrUndefined(args['previousRowIndex']))) {
|
|
3731
3735
|
args.cancel = true;
|
|
3732
3736
|
return;
|
|
3733
3737
|
}
|
|
3734
|
-
else if (args['name'] ===
|
|
3738
|
+
else if (args['name'] === 'rowDeselecting' && !isNullOrUndefined(args.target) && ((!isNullOrUndefined(args.row) && (!args.row.length)) && (args.target.classList.contains('e-treegridexpand')
|
|
3735
3739
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')))) {
|
|
3736
3740
|
args.cancel = true;
|
|
3737
3741
|
return;
|
|
@@ -8147,7 +8151,12 @@ class RowDD$1 {
|
|
|
8147
8151
|
}
|
|
8148
8152
|
length = record.childRecords.length;
|
|
8149
8153
|
for (let i = 0; i < length; i++) {
|
|
8150
|
-
|
|
8154
|
+
if (!this.isMultipleGrid) {
|
|
8155
|
+
currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, tObj);
|
|
8156
|
+
}
|
|
8157
|
+
else {
|
|
8158
|
+
currentRecord = record.childRecords[i];
|
|
8159
|
+
}
|
|
8151
8160
|
count++;
|
|
8152
8161
|
tObj.flatData.splice(count, 0, currentRecord);
|
|
8153
8162
|
setValue('uniqueIDCollection.' + currentRecord.uniqueID, currentRecord, this.parent);
|
|
@@ -8169,7 +8178,12 @@ class RowDD$1 {
|
|
|
8169
8178
|
}
|
|
8170
8179
|
length = record.childRecords.length;
|
|
8171
8180
|
for (let i = 0; i < length; i++) {
|
|
8172
|
-
|
|
8181
|
+
if (!this.isMultipleGrid) {
|
|
8182
|
+
currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, this.parent);
|
|
8183
|
+
}
|
|
8184
|
+
else {
|
|
8185
|
+
currentRecord = record.childRecords[i];
|
|
8186
|
+
}
|
|
8173
8187
|
let parentData;
|
|
8174
8188
|
if (record.parentItem) {
|
|
8175
8189
|
parentData = getParentData(this.parent, record.parentItem.uniqueID);
|
|
@@ -8432,7 +8446,11 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
8432
8446
|
const info = this.getDataInfo();
|
|
8433
8447
|
if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
|
|
8434
8448
|
if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
|
|
8435
|
-
|
|
8449
|
+
if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
8450
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
|
|
8451
|
+
|| notifyArgs.virtualInfo.blockIndexes.length === 1) {
|
|
8452
|
+
notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
|
|
8453
|
+
}
|
|
8436
8454
|
}
|
|
8437
8455
|
else {
|
|
8438
8456
|
notifyArgs.virtualInfo.blockIndexes = this.getBlockIndexes(notifyArgs.virtualInfo.page);
|
|
@@ -10819,6 +10837,10 @@ class Edit$1 {
|
|
|
10819
10837
|
}
|
|
10820
10838
|
this.updateGridEditMode('Batch');
|
|
10821
10839
|
}
|
|
10840
|
+
else if (this.parent.editSettings.mode === 'Cell' && (!column.allowEditing || column.isPrimaryKey)) {
|
|
10841
|
+
this.isOnBatch = true;
|
|
10842
|
+
this.updateGridEditMode('Batch');
|
|
10843
|
+
}
|
|
10822
10844
|
}
|
|
10823
10845
|
updateGridEditMode(mode) {
|
|
10824
10846
|
this.parent.grid.setProperties({ editSettings: { mode: mode } }, true);
|
|
@@ -11489,7 +11511,12 @@ class Edit$1 {
|
|
|
11489
11511
|
}
|
|
11490
11512
|
index = (childRecordCount1 > 0) ? (currentDataIndex1 + childRecordCount1) : (currentDataIndex1);
|
|
11491
11513
|
if (this.isSelfReference) {
|
|
11492
|
-
|
|
11514
|
+
if (!this.parent.isLocalData && this.parent.editModule.selectedIndex === -1) {
|
|
11515
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = null;
|
|
11516
|
+
}
|
|
11517
|
+
else {
|
|
11518
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = idMapping;
|
|
11519
|
+
}
|
|
11493
11520
|
if (!isNullOrUndefined(value.parentItem)) {
|
|
11494
11521
|
updateParentRow(key, value.parentItem, 'add', this.parent, this.isSelfReference, value);
|
|
11495
11522
|
}
|
|
@@ -11870,7 +11897,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
11870
11897
|
this.parent[action]('data-ready', this.onDataReady, this);
|
|
11871
11898
|
this.parent[action]('refresh-virtual-block', this.refreshContentRows, this);
|
|
11872
11899
|
this.fn = () => {
|
|
11873
|
-
this.observers.observes((scrollArgs) => this.scrollListeners(scrollArgs), this.onEnteredAction());
|
|
11900
|
+
this.observers.observes((scrollArgs) => this.scrollListeners(scrollArgs), this.onEnteredAction(), this.parent);
|
|
11874
11901
|
this.parent.off('content-ready', this.fn);
|
|
11875
11902
|
};
|
|
11876
11903
|
this.parent.addEventListener('dataBound', this.dataBoundEvent.bind(this));
|
|
@@ -12198,7 +12225,9 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12198
12225
|
}
|
|
12199
12226
|
}
|
|
12200
12227
|
if (((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
|
|
12201
|
-
|| (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left')
|
|
12228
|
+
|| (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
|
|
12229
|
+
((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
12230
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))) {
|
|
12202
12231
|
const viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
|
|
12203
12232
|
this.previousInfo = viewInfo;
|
|
12204
12233
|
this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
|
|
@@ -12315,20 +12344,20 @@ class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
12315
12344
|
this.lastPos = 0;
|
|
12316
12345
|
this.timer = 0;
|
|
12317
12346
|
}
|
|
12318
|
-
observes(callback, onEnterCallback) {
|
|
12347
|
+
observes(callback, onEnterCallback, instance) {
|
|
12319
12348
|
const containerRect = 'containerRect';
|
|
12320
12349
|
super[containerRect] = getValue('options', this).container.getBoundingClientRect();
|
|
12321
|
-
EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12350
|
+
EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
|
|
12322
12351
|
if (getValue('options', this).movableContainer) {
|
|
12323
12352
|
const movableContainerRect = 'movableContainerRect';
|
|
12324
12353
|
super[movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
|
|
12325
|
-
EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12354
|
+
EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
|
|
12326
12355
|
}
|
|
12327
12356
|
}
|
|
12328
12357
|
clear() {
|
|
12329
12358
|
this.lastPos = null;
|
|
12330
12359
|
}
|
|
12331
|
-
virtualScrollHandlers(callback, onEnterCallback) {
|
|
12360
|
+
virtualScrollHandlers(callback, onEnterCallback, instance) {
|
|
12332
12361
|
const delay = Browser.info.name === 'chrome' ? 200 : 100;
|
|
12333
12362
|
const options = 'options';
|
|
12334
12363
|
const movableEle = 'movableEle';
|
|
@@ -12372,15 +12401,20 @@ class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
12372
12401
|
}
|
|
12373
12402
|
}
|
|
12374
12403
|
if (check) {
|
|
12375
|
-
let fn =
|
|
12404
|
+
let fn = debounced50;
|
|
12376
12405
|
if (current.axis === 'X') {
|
|
12377
|
-
fn = debounced50;
|
|
12378
12406
|
fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
|
|
12379
12407
|
focusElement: document.activeElement });
|
|
12380
12408
|
}
|
|
12381
12409
|
else {
|
|
12382
|
-
|
|
12383
|
-
|
|
12410
|
+
if ((instance.dataSource instanceof DataManager && instance.dataSource.dataSource.url !== undefined
|
|
12411
|
+
&& !instance.dataSource.dataSource.offline && instance.dataSource.dataSource.url !== '') || isCountRequired(instance)) {
|
|
12412
|
+
fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
|
|
12413
|
+
focusElement: document.activeElement });
|
|
12414
|
+
}
|
|
12415
|
+
else
|
|
12416
|
+
callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
|
|
12417
|
+
focusElement: document.activeElement });
|
|
12384
12418
|
}
|
|
12385
12419
|
}
|
|
12386
12420
|
this[fromWheel] = false;
|