@syncfusion/ej2-treegrid 19.3.44 → 19.3.48

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/ej2-treegrid.umd.min.js +2 -2
  3. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-treegrid.es2015.js +286 -93
  5. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  6. package/dist/es6/ej2-treegrid.es5.js +322 -125
  7. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  8. package/dist/global/ej2-treegrid.min.js +2 -2
  9. package/dist/global/ej2-treegrid.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +9 -9
  12. package/src/treegrid/actions/batch-edit.js +19 -7
  13. package/src/treegrid/actions/crud-actions.js +1 -0
  14. package/src/treegrid/actions/edit.js +14 -7
  15. package/src/treegrid/actions/freeze-column.js +2 -1
  16. package/src/treegrid/actions/rowdragdrop.js +69 -46
  17. package/src/treegrid/actions/selection.js +29 -6
  18. package/src/treegrid/actions/virtual-scroll.js +15 -4
  19. package/src/treegrid/base/constant.d.ts +4 -0
  20. package/src/treegrid/base/constant.js +4 -0
  21. package/src/treegrid/base/treegrid-model.d.ts +8 -0
  22. package/src/treegrid/base/treegrid.d.ts +8 -0
  23. package/src/treegrid/base/treegrid.js +46 -17
  24. package/src/treegrid/renderer/render.js +9 -1
  25. package/src/treegrid/renderer/virtual-row-model-generator.d.ts +1 -0
  26. package/src/treegrid/renderer/virtual-row-model-generator.js +12 -0
  27. package/src/treegrid/renderer/virtual-tree-content-render.d.ts +2 -1
  28. package/src/treegrid/renderer/virtual-tree-content-render.js +102 -35
  29. package/styles/bootstrap-dark.css +1 -1
  30. package/styles/bootstrap.css +1 -1
  31. package/styles/bootstrap4.css +6 -1
  32. package/styles/bootstrap5-dark.css +32 -27
  33. package/styles/bootstrap5.css +32 -27
  34. package/styles/fabric-dark.css +1 -1
  35. package/styles/fabric.css +1 -1
  36. package/styles/highcontrast-light.css +1 -1
  37. package/styles/highcontrast.css +1 -1
  38. package/styles/material-dark.css +1 -1
  39. package/styles/material.css +1 -1
  40. package/styles/tailwind-dark.css +27 -27
  41. package/styles/tailwind.css +1 -1
  42. package/styles/treegrid/_bootstrap5-definition.scss +4 -4
  43. package/styles/treegrid/_layout.scss +1 -1
  44. package/styles/treegrid/_tailwind-definition.scss +4 -4
  45. package/styles/treegrid/bootstrap-dark.css +1 -1
  46. package/styles/treegrid/bootstrap.css +1 -1
  47. package/styles/treegrid/bootstrap4.css +6 -1
  48. package/styles/treegrid/bootstrap5-dark.css +32 -27
  49. package/styles/treegrid/bootstrap5.css +32 -27
  50. package/styles/treegrid/fabric-dark.css +1 -1
  51. package/styles/treegrid/fabric.css +1 -1
  52. package/styles/treegrid/highcontrast-light.css +1 -1
  53. package/styles/treegrid/highcontrast.css +1 -1
  54. package/styles/treegrid/material-dark.css +1 -1
  55. package/styles/treegrid/material.css +1 -1
  56. package/styles/treegrid/tailwind-dark.css +27 -27
  57. package/styles/treegrid/tailwind.css +1 -1
@@ -441,7 +441,8 @@ var TreeGrid = /** @class */ (function (_super) {
441
441
  member: 'ExcelExport', args: [this]
442
442
  });
443
443
  }
444
- if (this.frozenColumns || this.frozenRows || this.getFrozenColumns() || this.grid.getFrozenLeftColumnsCount() || this.grid.getFrozenRightColumnsCount()) {
444
+ if (this.frozenColumns || this.frozenRows || this.getFrozenColumns() ||
445
+ this.grid.getFrozenLeftColumnsCount() || this.grid.getFrozenRightColumnsCount()) {
445
446
  modules.push({
446
447
  member: 'freeze', args: [this]
447
448
  });
@@ -662,6 +663,7 @@ var TreeGrid = /** @class */ (function (_super) {
662
663
  this.grid.allowSorting = this.allowSorting;
663
664
  this.grid.allowFiltering = this.allowFiltering;
664
665
  this.grid.enableVirtualization = this.enableVirtualization;
666
+ this.grid.enableColumnVirtualization = this.enableColumnVirtualization;
665
667
  this.grid.enableInfiniteScrolling = this.enableInfiniteScrolling;
666
668
  this.grid.infiniteScrollSettings = this.infiniteScrollSettings;
667
669
  this.grid.width = this.width;
@@ -1023,6 +1025,10 @@ var TreeGrid = /** @class */ (function (_super) {
1023
1025
  && (_this.grid.filterSettings.columns.length === 0 || _this.grid.searchSettings.key.length === 0)) {
1024
1026
  _this.notify('clearFilters', { flatData: _this.grid.dataSource });
1025
1027
  _this.grid.setProperties({ dataSource: _this.dataResults.result }, true);
1028
+ if (isNullOrUndefined(_this.grid['changedProperties'].dataSource)) {
1029
+ _this.grid.renderModule.data.dataManager = _this.grid.dataSource instanceof DataManager ? _this.grid.dataSource :
1030
+ (isNullOrUndefined(_this.grid.dataSource) ? new DataManager() : new DataManager(_this.grid.dataSource));
1031
+ }
1026
1032
  }
1027
1033
  var callBackPromise = new Deferred();
1028
1034
  _this.trigger(events.actionBegin, args, function (actionArgs) {
@@ -1048,7 +1054,7 @@ var TreeGrid = /** @class */ (function (_super) {
1048
1054
  _this.notify(events.batchSave, args);
1049
1055
  }
1050
1056
  _this.notify('updateGridActions', args);
1051
- if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary == true; }).length) {
1057
+ if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
1052
1058
  _this.grid.refresh();
1053
1059
  }
1054
1060
  _this.trigger(events.actionComplete, args);
@@ -1344,6 +1350,9 @@ var TreeGrid = /** @class */ (function (_super) {
1344
1350
  case 'enableVirtualization':
1345
1351
  this.grid.enableVirtualization = this.enableVirtualization;
1346
1352
  break;
1353
+ case 'enableColumnVirtualization':
1354
+ this.grid.enableColumnVirtualization = this.enableColumnVirtualization;
1355
+ break;
1347
1356
  case 'toolbar':
1348
1357
  this.grid.toolbar = this.getGridToolbar();
1349
1358
  break;
@@ -1567,6 +1576,11 @@ var TreeGrid = /** @class */ (function (_super) {
1567
1576
  if (isNullOrUndefined(this.grid)) {
1568
1577
  return;
1569
1578
  }
1579
+ if (!isNullOrUndefined(this.rowDropSettings.targetID) &&
1580
+ isNullOrUndefined(document.getElementById(this.grid.rowDropSettings.targetID))) {
1581
+ document.getElementById(this.rowDropSettings.targetID).id = this.grid.rowDropSettings.targetID;
1582
+ this.rowDropSettings.targetID = this.grid.rowDropSettings.targetID;
1583
+ }
1570
1584
  _super.prototype.dataBind.call(this);
1571
1585
  this.grid.dataBind();
1572
1586
  };
@@ -1578,7 +1592,7 @@ var TreeGrid = /** @class */ (function (_super) {
1578
1592
  */
1579
1593
  TreeGrid.prototype.getPersistData = function () {
1580
1594
  var keyEntity = ['pageSettings', 'sortSettings',
1581
- 'filterSettings', 'columns', 'searchSettings', 'selectedRowIndex'];
1595
+ 'filterSettings', 'columns', 'searchSettings', 'selectedRowIndex', 'treeColumnIndex'];
1582
1596
  var ignoreOnPersist = {
1583
1597
  pageSettings: ['template', 'pageSizes', 'pageSizeMode', 'enableQueryString', 'totalRecordsCount', 'pageCount'],
1584
1598
  filterSettings: ['type', 'mode', 'showFilterBarStatus', 'immediateModeDelay', 'ignoreAccent', 'hierarchyMode'],
@@ -1589,9 +1603,9 @@ var TreeGrid = /** @class */ (function (_super) {
1589
1603
  'commandTemplate', 'commands', 'dataSource'];
1590
1604
  for (var i = 0; i < keyEntity.length; i++) {
1591
1605
  var currentObject = this[keyEntity[i]];
1592
- for (var _i = 0, _a = ignoreOnPersist[keyEntity[i]]; _i < _a.length; _i++) {
1593
- var val = _a[_i];
1594
- delete currentObject[val];
1606
+ for (var k = 0, val = ignoreOnPersist[keyEntity[i]]; (!isNullOrUndefined(val) && k < val.length); k++) {
1607
+ var objVal = val[k];
1608
+ delete currentObject[objVal];
1595
1609
  }
1596
1610
  }
1597
1611
  this.ignoreInArrays(ignoreOnColumn, this.columns);
@@ -1994,6 +2008,16 @@ var TreeGrid = /** @class */ (function (_super) {
1994
2008
  TreeGrid.prototype.getColumnIndexByField = function (field) {
1995
2009
  return this.grid.getColumnIndexByField(field);
1996
2010
  };
2011
+ TreeGrid.prototype.getVirtualColIndexByUid = function (uid) {
2012
+ var columnModel = 'columnModel';
2013
+ var index = iterateArrayOrObject(this.grid[columnModel], function (item, index) {
2014
+ if (item.uid === uid) {
2015
+ return index;
2016
+ }
2017
+ return undefined;
2018
+ })[0];
2019
+ return !isNullOrUndefined(index) ? index : -1;
2020
+ };
1997
2021
  /**
1998
2022
  * Gets a column index by UID.
1999
2023
  *
@@ -2022,18 +2046,20 @@ var TreeGrid = /** @class */ (function (_super) {
2022
2046
  temp = this.columnModel[this.treeColumnIndex].template;
2023
2047
  field = this.columnModel[this.treeColumnIndex].field;
2024
2048
  }
2025
- this.columnModel = [];
2026
2049
  var stackedHeader = false;
2027
2050
  var gridColumn;
2028
- for (var i = 0; i < gridColumns.length; i++) {
2029
- gridColumn = {};
2030
- for (var _i = 0, _a = Object.keys(gridColumns[i]); _i < _a.length; _i++) {
2031
- var prop = _a[_i];
2032
- gridColumn[prop] = gridColumns[i][prop];
2033
- }
2034
- this.columnModel.push(new Column(gridColumn));
2035
- if (field === this.columnModel[i].field && (!isNullOrUndefined(temp) && temp !== '')) {
2036
- this.columnModel[i].template = temp;
2051
+ if (!this.enableColumnVirtualization || (this.enableColumnVirtualization && this.columnModel.length === gridColumns.length)) {
2052
+ this.columnModel = [];
2053
+ for (var i = 0; i < gridColumns.length; i++) {
2054
+ gridColumn = {};
2055
+ for (var _i = 0, _a = Object.keys(gridColumns[i]); _i < _a.length; _i++) {
2056
+ var prop = _a[_i];
2057
+ gridColumn[prop] = gridColumns[i][prop];
2058
+ }
2059
+ this.columnModel.push(new Column(gridColumn));
2060
+ if (field === this.columnModel[i].field && (!isNullOrUndefined(temp) && temp !== '')) {
2061
+ this.columnModel[i].template = temp;
2062
+ }
2037
2063
  }
2038
2064
  }
2039
2065
  var merge = 'deepMerge';
@@ -2405,7 +2431,7 @@ var TreeGrid = /** @class */ (function (_super) {
2405
2431
  var row = getObject('rows', rec);
2406
2432
  var record = getObject('records', rec);
2407
2433
  for (var i = 0; i < record.length; i++) {
2408
- if (record[i].parentItem != undefined) {
2434
+ if (record[i].parentItem !== undefined) {
2409
2435
  var pindex = this.flatData[record[i].parentItem.index].index;
2410
2436
  if (this.flatData[pindex].expanded === false) {
2411
2437
  record.push(this.flatData[pindex]);
@@ -3370,6 +3396,9 @@ var TreeGrid = /** @class */ (function (_super) {
3370
3396
  __decorate([
3371
3397
  Property(false)
3372
3398
  ], TreeGrid.prototype, "enableVirtualization", void 0);
3399
+ __decorate([
3400
+ Property(false)
3401
+ ], TreeGrid.prototype, "enableColumnVirtualization", void 0);
3373
3402
  __decorate([
3374
3403
  Property(false)
3375
3404
  ], TreeGrid.prototype, "enableInfiniteScrolling", void 0);
@@ -96,7 +96,15 @@ var Render = /** @class */ (function () {
96
96
  else {
97
97
  index = data.index;
98
98
  }
99
- if (grid.getColumnIndexByUid(args.column.uid) === this.parent.treeColumnIndex && (args.requestType === 'add' || args.requestType
99
+ var columnIndex;
100
+ var getVirtualColIndexByUid = 'getVirtualColIndexByUid';
101
+ if (this.parent.enableColumnVirtualization && !this.parent.initialRender) {
102
+ columnIndex = this.parent[getVirtualColIndexByUid](args.column.uid);
103
+ }
104
+ else {
105
+ columnIndex = grid.getColumnIndexByUid(args.column.uid);
106
+ }
107
+ if (columnIndex === this.parent.treeColumnIndex && (args.requestType === 'add' || args.requestType
100
108
  === 'rowDragAndDrop' || args.requestType === 'delete' || isNullOrUndefined(args.cell.querySelector('.e-treecell')))) {
101
109
  var container = createElement('div', { className: 'e-treecolumn-container' });
102
110
  var emptyExpandIcon = createElement('span', {
@@ -10,6 +10,7 @@ export declare class TreeVirtualRowModelGenerator extends VirtualRowModelGenerat
10
10
  constructor(parent: IGrid);
11
11
  addEventListener(): void;
12
12
  private getDatas;
13
+ private getDataInfo;
13
14
  generateRows(data: Object[], notifyArgs?: NotifyArgs): Row<Column>[];
14
15
  checkAndResetCache(action: string): boolean;
15
16
  }
@@ -34,7 +34,19 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
34
34
  TreeVirtualRowModelGenerator.prototype.getDatas = function (args) {
35
35
  this.visualData = args.data;
36
36
  };
37
+ TreeVirtualRowModelGenerator.prototype.getDataInfo = function () {
38
+ return _super.prototype.getData.call(this);
39
+ };
37
40
  TreeVirtualRowModelGenerator.prototype.generateRows = function (data, notifyArgs) {
41
+ var info = this.getDataInfo();
42
+ if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
43
+ if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
44
+ notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
45
+ }
46
+ else {
47
+ notifyArgs.virtualInfo.blockIndexes = this.getBlockIndexes(notifyArgs.virtualInfo.page);
48
+ }
49
+ }
38
50
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
39
51
  && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
40
52
  return _super.prototype.generateRows.call(this, data, notifyArgs);
@@ -49,6 +49,7 @@ export declare class VirtualTreeContentRenderer extends VirtualContentRenderer {
49
49
  private restoreNewRow;
50
50
  private getData;
51
51
  private onActionComplete;
52
+ private onEnteredAction;
52
53
  scrollListeners(scrollArgs: ScrollArg): void;
53
54
  appendContent(target: HTMLElement, newChild: DocumentFragment, e: NotifyArgs): void;
54
55
  removeEventListener(): void;
@@ -58,7 +59,7 @@ export declare class TreeInterSectionObserver extends InterSectionObserver {
58
59
  private newPos;
59
60
  private lastPos;
60
61
  private timer;
61
- observes(callback: Function): void;
62
+ observes(callback: Function, onEnterCallback: Function): void;
62
63
  private clear;
63
64
  private virtualScrollHandlers;
64
65
  }
@@ -16,7 +16,7 @@ import { VirtualContentRenderer } from '@syncfusion/ej2-grids';
16
16
  import { InterSectionObserver } from '@syncfusion/ej2-grids';
17
17
  import { TreeVirtualRowModelGenerator } from '../renderer/virtual-row-model-generator';
18
18
  import * as events from '../base/constant';
19
- import { isNullOrUndefined, EventHandler, getValue, setValue, Browser } from '@syncfusion/ej2-base';
19
+ import { isNullOrUndefined, EventHandler, getValue, setValue, Browser, debounce } from '@syncfusion/ej2-base';
20
20
  import { DataManager } from '@syncfusion/ej2-data';
21
21
  import { isCountRequired } from '../utils';
22
22
  var VirtualTreeContentRenderer = /** @class */ (function (_super) {
@@ -88,9 +88,9 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
88
88
  if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
89
89
  && this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
90
90
  this.parent[action]('data-ready', this.onDataReady, this);
91
- //this.parent[action]('refresh-virtual-block', this.refreshContentRows, this);
91
+ this.parent[action]('refresh-virtual-block', this.refreshContentRows, this);
92
92
  this.fn = function () {
93
- _this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); });
93
+ _this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction());
94
94
  _this.parent.off('content-ready', _this.fn);
95
95
  };
96
96
  this.parent.addEventListener('dataBound', this.dataBoundEvent.bind(this));
@@ -122,7 +122,9 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
122
122
  && this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
123
123
  if (!isNullOrUndefined(e.count)) {
124
124
  this.totalRecords = e.count;
125
- getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
125
+ if (!this.parent.enableColumnVirtualization) {
126
+ getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
127
+ }
126
128
  }
127
129
  if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || this.isDataSourceChanged) {
128
130
  this.contents.scrollTop = 0;
@@ -180,6 +182,10 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
180
182
  return;
181
183
  }
182
184
  var selectVirtualRow = 'selectVirtualRow';
185
+ var containerRect = 'containerRect';
186
+ if (isNullOrUndefined(this.observer[containerRect])) {
187
+ this.observer[containerRect] = this.observers[containerRect];
188
+ }
183
189
  _super.prototype[selectVirtualRow].call(this, args);
184
190
  };
185
191
  VirtualTreeContentRenderer.prototype.refreshCell = function (rowObj) {
@@ -286,15 +292,39 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
286
292
  var actionComplete = 'actionComplete';
287
293
  _super.prototype[actionComplete].call(this, args);
288
294
  };
295
+ VirtualTreeContentRenderer.prototype.onEnteredAction = function () {
296
+ var _this = this;
297
+ return function (element, current, direction, e, isWheel, check) {
298
+ var directVirtualRender = 'directVirtualRender';
299
+ if (!_this.parent[directVirtualRender]) { // with this property, columns are rendered without debouncing on horizontal scroll.
300
+ var preventEvent = 'preventEvent';
301
+ if (Browser.isIE && !isWheel && check && !_this[preventEvent]) {
302
+ _this.parent.showSpinner();
303
+ }
304
+ var xAxis = current.axis === 'X';
305
+ var x = _this.getColumnOffset(xAxis ? _this.vgenerator.getColumnIndexes()[0] - 1 : _this.prevInfo.columnIndexes[0]
306
+ - 1);
307
+ if (xAxis) {
308
+ var idx = Object.keys(_this.vgenerator.cOffsets).length - _this.prevInfo.columnIndexes.length;
309
+ var maxLeft = _this.vgenerator.cOffsets[idx - 1];
310
+ x = x > maxLeft ? maxLeft : x; //TODO: This fix horizontal scrollbar jumping issue in column virtualization.
311
+ }
312
+ _this.virtualEle.adjustTable(x, _this.translateY);
313
+ if (_this.parent.enableColumnVirtualization) {
314
+ _this.header.virtualEle.adjustTable(x, 0);
315
+ }
316
+ }
317
+ };
318
+ };
289
319
  VirtualTreeContentRenderer.prototype.scrollListeners = function (scrollArgs) {
290
320
  var info = scrollArgs.sentinel;
291
- var outBuffer = 10; //this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 1.5);
321
+ var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
292
322
  var content = this.parent.getContent().querySelector('.e-content');
293
323
  var scrollHeight = outBuffer * this.parent.getRowHeight();
294
324
  var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
295
325
  var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) >= scrollHeight;
296
326
  var selectedRowIndex = 'selectedRowIndex';
297
- if (upScroll) {
327
+ if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
298
328
  var vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? this.parent.height :
299
329
  this.parent.element.getBoundingClientRect().height);
300
330
  var index = (~~(content.scrollTop / this.parent.getRowHeight())
@@ -331,7 +361,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
331
361
  scrollArgs.offset.top - (outBuffer * height) + 10 : 0;
332
362
  }
333
363
  }
334
- else if (downScroll) {
364
+ else if (downScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
335
365
  var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
336
366
  var isLastBlock = (this[selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
337
367
  if (!isNullOrUndefined(this[selectedRowIndex]) && this[selectedRowIndex] !== -1 &&
@@ -352,14 +382,17 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
352
382
  this.translateY = scrollArgs.offset.top;
353
383
  }
354
384
  }
355
- if ((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
356
- || (upScroll)) {
357
- var viewInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
385
+ if (((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
386
+ || (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left')) {
387
+ var viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
358
388
  this.previousInfo = viewInfo;
389
+ this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
359
390
  var page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
360
391
  this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
361
- viewInfo.event = viewInfo.event === 'refresh-virtual-block' ? 'model-changed' : viewInfo.event;
362
- this.parent.notify(viewInfo.event, { requestType: 'virtualscroll', focusElement: scrollArgs.focusElement });
392
+ if (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') {
393
+ viewInfo.event = viewInfo.event === 'refresh-virtual-block' ? 'model-changed' : viewInfo.event;
394
+ }
395
+ this.parent.notify(viewInfo.event, { requestType: 'virtualscroll', virtualInfo: viewInfo, focusElement: scrollArgs.focusElement });
363
396
  }
364
397
  };
365
398
  VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
@@ -376,7 +409,14 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
376
409
  getValue('currentInfo', this) : e.virtualInfo;
377
410
  var cBlock = (info.columnIndexes[0]) - 1;
378
411
  var cOffset = this.getColumnOffset(cBlock);
379
- this.virtualEle.setWrapperWidth(null, (Browser.isIE || Browser.info.name === 'edge'));
412
+ var width = void 0;
413
+ if (this.parent.enableColumnVirtualization) {
414
+ this.header.virtualEle.adjustTable(cOffset, 0);
415
+ var cIndex = info.columnIndexes;
416
+ width = this.getColumnOffset(cIndex[cIndex.length - 1]) - this.getColumnOffset(cIndex[0] - 1) + '';
417
+ this.header.virtualEle.setWrapperWidth(width);
418
+ }
419
+ this.virtualEle.setWrapperWidth(width, (Browser.isIE || Browser.info.name === 'edge'));
380
420
  target = this.parent.createElement('tbody');
381
421
  target.appendChild(newChild);
382
422
  var replace = 'replaceWith';
@@ -388,8 +428,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
388
428
  this.isExpandCollapse = false;
389
429
  }
390
430
  setValue('prevInfo', this.previousInfo ? this.previousInfo : info, this);
431
+ if (e.requestType === 'virtualscroll' && e.virtualInfo.sentinelInfo.axis === 'X') {
432
+ this.parent.notify(events.autoCol, {});
433
+ }
391
434
  var focusCell = 'focusCell';
392
435
  var restoreAdd = 'restoreAdd';
436
+ var ensureSelectedRowPosition = 'ensureSelectedRowPosition';
393
437
  _super.prototype[focusCell].call(this, e);
394
438
  var isAdd = 'isAdd';
395
439
  if (this[isAdd] && !this.parent.getContent().querySelector('.e-content').querySelector('.e-addedrow')) {
@@ -405,6 +449,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
405
449
  }
406
450
  this.restoreEditState();
407
451
  _super.prototype[restoreAdd].call(this);
452
+ _super.prototype[ensureSelectedRowPosition].call(this);
408
453
  }
409
454
  };
410
455
  VirtualTreeContentRenderer.prototype.removeEventListener = function () {
@@ -441,28 +486,34 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
441
486
  _this.timer = 0;
442
487
  return _this;
443
488
  }
444
- TreeInterSectionObserver.prototype.observes = function (callback) {
489
+ TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback) {
445
490
  var containerRect = 'containerRect';
446
491
  _super.prototype[containerRect] = getValue('options', this).container.getBoundingClientRect();
447
- EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback), this);
492
+ EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
448
493
  };
449
494
  TreeInterSectionObserver.prototype.clear = function () {
450
495
  this.lastPos = null;
451
496
  };
452
- TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback) {
497
+ TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback) {
453
498
  var _this = this;
454
- var prevTop = 0;
455
- var prevLeft = 0;
499
+ var delay = Browser.info.name === 'chrome' ? 200 : 100;
500
+ var options = 'options';
501
+ var movableEle = 'movableEle';
502
+ var element = 'element';
503
+ var fromWheel = 'fromWheel';
504
+ var debounced100 = debounce(callback, delay);
505
+ var debounced50 = debounce(callback, 50);
506
+ this[options].prevTop = this[options].prevLeft = 0;
456
507
  return function (e) {
457
- var scrollTop = e.target.scrollTop;
458
- var scrollLeft = e.target.scrollLeft;
459
- var direction = prevTop < scrollTop ? 'down' : 'up';
460
- direction = prevLeft === scrollLeft ? direction : prevLeft < scrollLeft ? 'right' : 'left';
461
- prevTop = scrollTop;
462
- prevLeft = scrollLeft;
463
- var current = getValue('sentinelInfo', _this)[direction];
508
+ var top = _this[options].movableContainer ? _this[options].container.scrollTop : e.target.scrollTop;
509
+ var left = _this[options].movableContainer ? _this[options].scrollbar.scrollLeft : e.target.scrollLeft;
510
+ var direction = _this[options].prevTop < top ? 'down' : 'up';
511
+ direction = _this[options].prevLeft === left ? direction : _this[options].prevLeft < left ? 'right' : 'left';
512
+ _this[options].prevTop = top;
513
+ _this[options].prevLeft = left;
514
+ var current = _this.sentinelInfo[direction];
464
515
  var delta = 0;
465
- _this.newPos = scrollTop;
516
+ _this.newPos = top;
466
517
  if (_this.lastPos != null) { // && newPos < maxScroll
467
518
  delta = _this.newPos - _this.lastPos;
468
519
  }
@@ -471,19 +522,35 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
471
522
  clearTimeout(_this.timer);
472
523
  }
473
524
  _this.timer = setTimeout(_this.clear, 0);
474
- /*if (this.options.axes.indexOf(current.axis) === -1) {
475
- return;
476
- }*/
477
- /*if(delta > 45 || delta < -45){
478
- this.isWheeling = true;
479
- }*/
480
525
  if ((delta > 100 || delta < -100) && (e && e.preventDefault)) {
481
526
  e.returnValue = false;
482
527
  e.preventDefault();
483
528
  }
484
- callback({ direction: direction, isWheel: _this.isWheeling,
485
- sentinel: current, offset: { top: scrollTop, left: scrollLeft },
486
- focusElement: document.activeElement });
529
+ if (_this[options].axes.indexOf(current.axis) === -1) {
530
+ return;
531
+ }
532
+ var check = _this.check(direction);
533
+ if (current.entered && current.axis === 'X') {
534
+ if (_this[movableEle] && (direction === 'right' || direction === 'left')) {
535
+ onEnterCallback(_this[movableEle], current, direction, { top: top, left: left }, _this[fromWheel], check);
536
+ }
537
+ else {
538
+ onEnterCallback(_this[element], current, direction, { top: top, left: left }, _this[fromWheel], check);
539
+ }
540
+ }
541
+ if (check) {
542
+ var fn = debounced100;
543
+ if (current.axis === 'X') {
544
+ fn = debounced50;
545
+ fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
546
+ focusElement: document.activeElement });
547
+ }
548
+ else {
549
+ callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
550
+ focusElement: document.activeElement });
551
+ }
552
+ }
553
+ _this[fromWheel] = false;
487
554
  };
488
555
  };
489
556
  return TreeInterSectionObserver;
@@ -270,7 +270,7 @@
270
270
 
271
271
  .e-treegrid .e-treecell {
272
272
  display: table-cell;
273
- line-height: 10px;
273
+ line-height: normal;
274
274
  }
275
275
 
276
276
  .e-treegrid .e-grid.e-wrap .e-rowcell .e-treecolumn-container {
@@ -271,7 +271,7 @@
271
271
 
272
272
  .e-treegrid .e-treecell {
273
273
  display: table-cell;
274
- line-height: 10px;
274
+ line-height: normal;
275
275
  }
276
276
 
277
277
  .e-treegrid .e-grid.e-wrap .e-rowcell .e-treecolumn-container {
@@ -77,6 +77,11 @@
77
77
  background: transparent;
78
78
  }
79
79
 
80
+ .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
81
+ .e-float-input.e-control-wrapper.e-ddl.e-readonly input[readonly] {
82
+ background: #e9ecef;
83
+ }
84
+
80
85
  .e-input-group:not(.e-disabled) .e-control.e-dropdownlist ~ .e-ddl-icon:active,
81
86
  .e-input-group:not(.e-disabled) .e-control.e-dropdownlist ~ .e-ddl-icon:hover,
82
87
  .e-control.e-dropdownlist .e-input-group:not(.e-disabled) .e-ddl-icon:active,
@@ -306,7 +311,7 @@
306
311
 
307
312
  .e-treegrid .e-treecell {
308
313
  display: table-cell;
309
- line-height: 10px;
314
+ line-height: normal;
310
315
  }
311
316
 
312
317
  .e-treegrid .e-grid.e-wrap .e-rowcell .e-treecolumn-container {