@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.
@@ -1505,6 +1505,8 @@ class Render {
1505
1505
  !getExpandStatus(this.parent, args.data, this.parent.grid.getCurrentViewRecords());
1506
1506
  if (collapsed$$1) {
1507
1507
  args.row.style.display = 'none';
1508
+ const rowsObj = this.parent.grid.getRowsObject();
1509
+ rowsObj.filter((e) => e.uid === args.row.getAttribute('data-uid'))[0].visible = false;
1508
1510
  }
1509
1511
  }
1510
1512
  if (isRemoteData(this.parent) && !isOffline(this.parent)) {
@@ -1533,6 +1535,15 @@ class Render {
1533
1535
  args.row.style.display = 'none';
1534
1536
  }
1535
1537
  }
1538
+ const draggedRecord = 'draggedRecord';
1539
+ if (!isNullOrUndefined(this.parent.rowDragAndDropModule) && !isNullOrUndefined(this.parent.rowDragAndDropModule[`${draggedRecord}`])
1540
+ && this.parent.getContentTable().scrollHeight <= this.parent.getContent().clientHeight) {
1541
+ const lastRowBorder = 'lastRowBorder';
1542
+ const lastVisualData = this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length - 1];
1543
+ if (lastVisualData.uniqueID === args.data.uniqueID && !isNullOrUndefined(args.row) && !args.row.cells[0].classList.contains('e-lastrowcell')) {
1544
+ this.parent[`${lastRowBorder}`](args.row, true);
1545
+ }
1546
+ }
1536
1547
  this.parent.trigger(rowDataBound, args);
1537
1548
  }
1538
1549
  /**
@@ -3974,7 +3985,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
3974
3985
  IsExpandCollapseClicked(args) {
3975
3986
  if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
3976
3987
  || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
3977
- && (!isNullOrUndefined(args.data) && args.data['hasChildRecords'])) {
3988
+ && (!isNullOrUndefined(args.data) && args.data['hasChildRecords']) && !this.selectionSettings.checkboxOnly) {
3978
3989
  args.cancel = true;
3979
3990
  return;
3980
3991
  }
@@ -4182,6 +4193,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4182
4193
  return callBackPromise;
4183
4194
  };
4184
4195
  this.grid.cellSelecting = (args) => {
4196
+ const actualTarget = 'actualTarget';
4197
+ const target = this.grid.selectionModule[`${actualTarget}`];
4198
+ if (!isNullOrUndefined(target) && (target.classList.contains('e-treegridexpand') || target.classList.contains('e-treegridcollapse'))) {
4199
+ args.cancel = true;
4200
+ }
4185
4201
  const callBackPromise = new Deferred();
4186
4202
  this.trigger(getObject('name', args), args, (cellselectingArgs) => {
4187
4203
  callBackPromise.resolve(cellselectingArgs);
@@ -8386,13 +8402,14 @@ class RowDD$1 {
8386
8402
  const childRecords = rec[0].childRecords;
8387
8403
  const droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
8388
8404
  childRecords.splice(droppedRecordIndex, 0, draggedRecord);
8389
- draggedRecord.parentItem = droppedRecord.parentItem;
8405
+ if (this.parent.enableImmutableMode || this.parent['isIndentEnabled'] && !this.parent.parentIdMapping) {
8406
+ draggedRecord.parentItem = droppedRecord.parentItem;
8407
+ draggedRecord.level = droppedRecord.level;
8408
+ }
8390
8409
  draggedRecord.parentUniqueID = droppedRecord.parentUniqueID;
8391
- draggedRecord.level = droppedRecord.level;
8392
8410
  if (this.parent.parentIdMapping) {
8393
8411
  draggedRecord[this.parent.parentIdMapping] = droppedRecord[this.parent.parentIdMapping];
8394
- draggedRecord.parentItem = droppedRecord.parentItem;
8395
- draggedRecord.level = droppedRecord.level;
8412
+ draggedRecord.parentUniqueID = droppedRecord.parentUniqueID;
8396
8413
  }
8397
8414
  }
8398
8415
  if (draggedRecord.hasChildRecords) {