@syncfusion/ej2-treegrid 21.1.37 → 21.1.41

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,16 @@ var Render = /** @__PURE__ @class */ (function () {
1667
1669
  args.row.style.display = 'none';
1668
1670
  }
1669
1671
  }
1672
+ var dragStartData = 'dragStartData';
1673
+ var draggedRecord = 'draggedRecord';
1674
+ if (this.parent.rowDragAndDropModule && this.parent.grid.rowDragAndDropModule && (this.parent.grid.rowDragAndDropModule["" + dragStartData] ||
1675
+ this.parent.rowDragAndDropModule["" + draggedRecord]) && this.parent.getContentTable().scrollHeight <= this.parent.getContent().clientHeight) {
1676
+ var lastRowBorder = 'lastRowBorder';
1677
+ var lastVisualData = this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length - 1];
1678
+ if (lastVisualData.uniqueID === args.data.uniqueID && !isNullOrUndefined(args.row) && !args.row.cells[0].classList.contains('e-lastrowcell')) {
1679
+ this.parent["" + lastRowBorder](args.row, true);
1680
+ }
1681
+ }
1670
1682
  this.parent.trigger(rowDataBound, args);
1671
1683
  };
1672
1684
  /**
@@ -4454,6 +4466,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4454
4466
  return callBackPromise;
4455
4467
  };
4456
4468
  this.grid.cellSelecting = function (args) {
4469
+ var actualTarget = 'actualTarget';
4470
+ var target = _this.grid.selectionModule["" + actualTarget];
4471
+ if (!isNullOrUndefined(target) && (target.classList.contains('e-treegridexpand') || target.classList.contains('e-treegridcollapse'))) {
4472
+ args.cancel = true;
4473
+ }
4457
4474
  var callBackPromise = new Deferred();
4458
4475
  _this.trigger(getObject('name', args), args, function (cellselectingArgs) {
4459
4476
  callBackPromise.resolve(cellselectingArgs);
@@ -4584,6 +4601,25 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4584
4601
  if (requestType === 'reorder') {
4585
4602
  _this.notify('getColumnIndex', {});
4586
4603
  }
4604
+ if (requestType === 'filterbeforeopen' && args.columnName && _this.filterSettings.hierarchyMode !== 'None') {
4605
+ for (var j = 0; j < _this.columns.length; j++) {
4606
+ var fields = 'field';
4607
+ if (_this.columns[parseInt(j.toString(), 10)]["" + fields] === args.columnName) {
4608
+ var taskFields = [];
4609
+ for (var i = 0; i < _this.grid.currentViewData.length; i++) {
4610
+ var fieldValue = _this.grid.currentViewData[parseInt(i.toString(), 10)][args.columnName];
4611
+ if (taskFields.indexOf(fieldValue) === -1) {
4612
+ taskFields.push(fieldValue);
4613
+ }
4614
+ }
4615
+ args['filterModel'].options.dataSource = taskFields.map(function (name) {
4616
+ var _a;
4617
+ return (_a = {}, _a[args.columnName] = name, _a);
4618
+ });
4619
+ args['filterModel'].options.filteredColumns = args['filterModel'].options.filteredColumns.filter(function (col) { return col.field === args.columnName; });
4620
+ }
4621
+ }
4622
+ }
4587
4623
  if (isRemoteData(_this) && _this.enableVirtualization) {
4588
4624
  if (args.requestType === 'virtualscroll') {
4589
4625
  _this.query.expand('VirtualScrollingAction');