@syncfusion/ej2-treegrid 20.3.48 → 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.
@@ -1644,7 +1644,11 @@ class Render {
1644
1644
  args.cell.querySelector('.e-treecell').innerHTML = summaryData;
1645
1645
  }
1646
1646
  else {
1647
- args.cell.innerHTML = summaryData;
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)) {
@@ -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
- currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, tObj);
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
- currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, this.parent);
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
- notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
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);
@@ -11879,7 +11897,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
11879
11897
  this.parent[action]('data-ready', this.onDataReady, this);
11880
11898
  this.parent[action]('refresh-virtual-block', this.refreshContentRows, this);
11881
11899
  this.fn = () => {
11882
- this.observers.observes((scrollArgs) => this.scrollListeners(scrollArgs), this.onEnteredAction());
11900
+ this.observers.observes((scrollArgs) => this.scrollListeners(scrollArgs), this.onEnteredAction(), this.parent);
11883
11901
  this.parent.off('content-ready', this.fn);
11884
11902
  };
11885
11903
  this.parent.addEventListener('dataBound', this.dataBoundEvent.bind(this));
@@ -12207,7 +12225,9 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
12207
12225
  }
12208
12226
  }
12209
12227
  if (((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
12210
- || (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))) {
12211
12231
  const viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
12212
12232
  this.previousInfo = viewInfo;
12213
12233
  this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
@@ -12324,20 +12344,20 @@ class TreeInterSectionObserver extends InterSectionObserver {
12324
12344
  this.lastPos = 0;
12325
12345
  this.timer = 0;
12326
12346
  }
12327
- observes(callback, onEnterCallback) {
12347
+ observes(callback, onEnterCallback, instance) {
12328
12348
  const containerRect = 'containerRect';
12329
12349
  super[containerRect] = getValue('options', this).container.getBoundingClientRect();
12330
- 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);
12331
12351
  if (getValue('options', this).movableContainer) {
12332
12352
  const movableContainerRect = 'movableContainerRect';
12333
12353
  super[movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
12334
- 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);
12335
12355
  }
12336
12356
  }
12337
12357
  clear() {
12338
12358
  this.lastPos = null;
12339
12359
  }
12340
- virtualScrollHandlers(callback, onEnterCallback) {
12360
+ virtualScrollHandlers(callback, onEnterCallback, instance) {
12341
12361
  const delay = Browser.info.name === 'chrome' ? 200 : 100;
12342
12362
  const options = 'options';
12343
12363
  const movableEle = 'movableEle';
@@ -12381,15 +12401,20 @@ class TreeInterSectionObserver extends InterSectionObserver {
12381
12401
  }
12382
12402
  }
12383
12403
  if (check) {
12384
- let fn = debounced100;
12404
+ let fn = debounced50;
12385
12405
  if (current.axis === 'X') {
12386
- fn = debounced50;
12387
12406
  fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
12388
12407
  focusElement: document.activeElement });
12389
12408
  }
12390
12409
  else {
12391
- callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
12392
- focusElement: document.activeElement });
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 });
12393
12418
  }
12394
12419
  }
12395
12420
  this[fromWheel] = false;