@syncfusion/ej2-treegrid 22.1.37 → 22.1.38

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.1.37
3
+ * version : 22.1.38
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@22.1.36",
3
+ "_id": "@syncfusion/ej2-treegrid@22.1.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-v4Iu+lVo/s6DbIN6B2tpcuh7jPfd9YmIexRJ36AEq/+COecwEQJ9Svj4BwgHhqmArel/uC7MIHXeiuyRU7/5nw==",
5
+ "_integrity": "sha512-3/h0c3spLymY4K/c6i+JtMPxdjUZ3c2eCuvAgOjaIeW3AJ1U3CabeTHD9NYvmkly66Y+lpe8x17/hF+ccHj5PQ==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-22.1.36.tgz",
28
- "_shasum": "863e6c49ec54bc9b0717212ba2e55c6cd50f7467",
27
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-22.1.37.tgz",
28
+ "_shasum": "31343969eed0b4698dec8a7f2e75d09a0b2b7d70",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~22.1.34",
40
- "@syncfusion/ej2-data": "~22.1.36",
41
- "@syncfusion/ej2-grids": "~22.1.37",
42
- "@syncfusion/ej2-popups": "~22.1.37"
39
+ "@syncfusion/ej2-base": "~22.1.38",
40
+ "@syncfusion/ej2-data": "~22.1.38",
41
+ "@syncfusion/ej2-grids": "~22.1.38",
42
+ "@syncfusion/ej2-popups": "~22.1.38"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -66,6 +66,6 @@
66
66
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
67
67
  },
68
68
  "typings": "index.d.ts",
69
- "version": "22.1.37",
69
+ "version": "22.1.38",
70
70
  "sideEffects": false
71
71
  }
@@ -838,7 +838,8 @@ var Edit = /** @class */ (function () {
838
838
  this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
839
839
  }
840
840
  }
841
- if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
841
+ if ((this.isAddedRowByMethod || (this.isAddedRowByContextMenu && this.parent.grid.selectedRowIndex !== -1)) &&
842
+ (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
842
843
  this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
843
844
  if (this.parent.enableVirtualization && this.isAddedRowByContextMenu) {
844
845
  this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
@@ -856,6 +857,10 @@ var Edit = /** @class */ (function () {
856
857
  && !isNullOrUndefined(this.parent.getSelectedRecords()[0])) {
857
858
  this.addRowRecord = this.parent.getSelectedRecords()[0];
858
859
  }
860
+ if (isNullOrUndefined(this.addRowRecord) && this.parent.getCurrentViewRecords().length > this.addRowIndex &&
861
+ args.requestType === 'save' && this.parent.getSelectedRecords().length !== 0) {
862
+ this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
863
+ }
859
864
  this.isAddedRowByMethod = false;
860
865
  args = this.beginAddEdit(args);
861
866
  // if (args.requestType === 'save' &&
@@ -414,7 +414,6 @@ var Selection = /** @class */ (function () {
414
414
  checkbox.classList.add(checkBoxclass);
415
415
  var chkstate = checkState === 'check' ? 'checked' : checkState === 'uncheck' ? 'unchecked' : 'mixed';
416
416
  tr.querySelector('.e-treecheckselect').setAttribute('aria-checked', checkState === 'check' ? 'true' : checkState === 'uncheck' ? 'false' : 'mixed');
417
- tr.querySelector('.e-frame').setAttribute('title', 'checkbox' + chkstate);
418
417
  }
419
418
  }
420
419
  };
@@ -101,7 +101,7 @@ var VirtualScroll = /** @class */ (function () {
101
101
  });
102
102
  this.visualData = visualData;
103
103
  this.parent.grid.notify(events.dataListener, { data: visualData });
104
- var counts = { startIndex: -1, endIndex: -1, count: pageingDetails.count };
104
+ var counts = { startIndex: -1, endIndex: -1, count: pageingDetails.count, requestType: pageingDetails.actionArgs.requestType };
105
105
  this.parent.grid.notify(events.indexModifier, counts);
106
106
  var startIndex = counts.startIndex;
107
107
  var endIndex = counts.endIndex;
@@ -124,7 +124,7 @@ var VirtualScroll = /** @class */ (function () {
124
124
  this.parent.grid.getContent().firstElementChild.scrollTop = 0;
125
125
  this.parent.grid.notify(events.virtualActionArgs, { setTop: true });
126
126
  }
127
- if (requestType === 'save' || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
127
+ if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
128
128
  startIndex = counts.startIndex + (counts.count - counts.endIndex);
129
129
  endIndex = counts.count;
130
130
  this.parent['isAddedFromGantt'] = false;
@@ -84,7 +84,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
84
84
  };
85
85
  VirtualTreeContentRenderer.prototype.indexModifier = function (args) {
86
86
  var content = this.parent.getContent().querySelector('.e-content');
87
- if (this.recordAdded && this.startIndex > -1 && this.endIndex > -1) {
87
+ if ((this.recordAdded || args.requestType === 'delete' && this.endIndex > args.count - this.parent.pageSettings.pageSize) && this.startIndex > -1 && this.endIndex > -1) {
88
88
  if (this.endIndex > args.count - this.parent.pageSettings.pageSize) {
89
89
  var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
90
90
  var lastIndex = nextSetResIndex + this.parent.getRows().length;
@@ -425,11 +425,11 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
425
425
  firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
426
426
  }
427
427
  if (firsttdinx === 0) {
428
+ scrollArgs.offset.top = content.scrollTop;
428
429
  if (this.parent.allowRowDragAndDrop) {
429
430
  this.translateY = scrollArgs.offset.top - rowHeight * 2;
430
431
  }
431
432
  else {
432
- scrollArgs.offset.top = content.scrollTop;
433
433
  this.translateY = scrollArgs.offset.top;
434
434
  }
435
435
  }
@@ -464,12 +464,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
464
464
  this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
465
465
  }
466
466
  else {
467
- if (this.parent.allowRowDragAndDrop) {
468
- this.translateY = scrollArgs.offset.top - rowHeight * 2;
467
+ if (this.totalRecords === this.endIndex) {
468
+ this.translateY = (this.totalRecords * rowHeight) - ((this.endIndex - this.startIndex) * rowHeight);
469
469
  }
470
470
  else {
471
- if (this.totalRecords === this.endIndex) {
472
- this.translateY = (this.totalRecords * rowHeight) - ((this.endIndex - this.startIndex) * rowHeight);
471
+ if (this.parent.allowRowDragAndDrop) {
472
+ this.translateY = scrollArgs.offset.top - rowHeight * 2;
473
473
  }
474
474
  else {
475
475
  this.translateY = scrollArgs.offset.top;