@syncfusion/ej2-treegrid 21.1.35 → 21.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.
@@ -1639,6 +1639,8 @@ var Render = /** @__PURE__ @class */ (function () {
1639
1639
  !getExpandStatus(this.parent, args.data, this.parent.grid.getCurrentViewRecords());
1640
1640
  if (collapsed$$1) {
1641
1641
  args.row.style.display = 'none';
1642
+ var rowsObj = this.parent.grid.getRowsObject();
1643
+ rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0].visible = false;
1642
1644
  }
1643
1645
  }
1644
1646
  if (isRemoteData(this.parent) && !isOffline(this.parent)) {
@@ -1667,6 +1669,15 @@ var Render = /** @__PURE__ @class */ (function () {
1667
1669
  args.row.style.display = 'none';
1668
1670
  }
1669
1671
  }
1672
+ var draggedRecord = 'draggedRecord';
1673
+ if (!isNullOrUndefined(this.parent.rowDragAndDropModule) && !isNullOrUndefined(this.parent.rowDragAndDropModule["" + draggedRecord])
1674
+ && this.parent.getContentTable().scrollHeight <= this.parent.getContent().clientHeight) {
1675
+ var lastRowBorder = 'lastRowBorder';
1676
+ var lastVisualData = this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length - 1];
1677
+ if (lastVisualData.uniqueID === args.data.uniqueID && !isNullOrUndefined(args.row) && !args.row.cells[0].classList.contains('e-lastrowcell')) {
1678
+ this.parent["" + lastRowBorder](args.row, true);
1679
+ }
1680
+ }
1670
1681
  this.parent.trigger(rowDataBound, args);
1671
1682
  };
1672
1683
  /**
@@ -4243,7 +4254,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4243
4254
  TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
4244
4255
  if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
4245
4256
  || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
4246
- && (!isNullOrUndefined(args.data) && args.data['hasChildRecords'])) {
4257
+ && (!isNullOrUndefined(args.data) && args.data['hasChildRecords']) && !this.selectionSettings.checkboxOnly) {
4247
4258
  args.cancel = true;
4248
4259
  return;
4249
4260
  }
@@ -4454,6 +4465,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4454
4465
  return callBackPromise;
4455
4466
  };
4456
4467
  this.grid.cellSelecting = function (args) {
4468
+ var actualTarget = 'actualTarget';
4469
+ var target = _this.grid.selectionModule["" + actualTarget];
4470
+ if (!isNullOrUndefined(target) && (target.classList.contains('e-treegridexpand') || target.classList.contains('e-treegridcollapse'))) {
4471
+ args.cancel = true;
4472
+ }
4457
4473
  var callBackPromise = new Deferred();
4458
4474
  _this.trigger(getObject('name', args), args, function (cellselectingArgs) {
4459
4475
  callBackPromise.resolve(cellselectingArgs);
@@ -8699,13 +8715,14 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
8699
8715
  var childRecords = rec[0].childRecords;
8700
8716
  var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
8701
8717
  childRecords.splice(droppedRecordIndex, 0, draggedRecord_2);
8702
- draggedRecord_2.parentItem = droppedRecord.parentItem;
8718
+ if (this_1.parent.enableImmutableMode || this_1.parent['isIndentEnabled'] && !this_1.parent.parentIdMapping) {
8719
+ draggedRecord_2.parentItem = droppedRecord.parentItem;
8720
+ draggedRecord_2.level = droppedRecord.level;
8721
+ }
8703
8722
  draggedRecord_2.parentUniqueID = droppedRecord.parentUniqueID;
8704
- draggedRecord_2.level = droppedRecord.level;
8705
8723
  if (this_1.parent.parentIdMapping) {
8706
8724
  draggedRecord_2[this_1.parent.parentIdMapping] = droppedRecord[this_1.parent.parentIdMapping];
8707
- draggedRecord_2.parentItem = droppedRecord.parentItem;
8708
- draggedRecord_2.level = droppedRecord.level;
8725
+ draggedRecord_2.parentUniqueID = droppedRecord.parentUniqueID;
8709
8726
  }
8710
8727
  }
8711
8728
  if (draggedRecord_2.hasChildRecords) {