@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.
@@ -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,16 @@ class Render {
1533
1535
  args.row.style.display = 'none';
1534
1536
  }
1535
1537
  }
1538
+ const dragStartData = 'dragStartData';
1539
+ const draggedRecord = 'draggedRecord';
1540
+ if (this.parent.rowDragAndDropModule && this.parent.grid.rowDragAndDropModule && (this.parent.grid.rowDragAndDropModule[`${dragStartData}`] ||
1541
+ this.parent.rowDragAndDropModule[`${draggedRecord}`]) && this.parent.getContentTable().scrollHeight <= this.parent.getContent().clientHeight) {
1542
+ const lastRowBorder = 'lastRowBorder';
1543
+ const lastVisualData = this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length - 1];
1544
+ if (lastVisualData.uniqueID === args.data.uniqueID && !isNullOrUndefined(args.row) && !args.row.cells[0].classList.contains('e-lastrowcell')) {
1545
+ this.parent[`${lastRowBorder}`](args.row, true);
1546
+ }
1547
+ }
1536
1548
  this.parent.trigger(rowDataBound, args);
1537
1549
  }
1538
1550
  /**
@@ -4182,6 +4194,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4182
4194
  return callBackPromise;
4183
4195
  };
4184
4196
  this.grid.cellSelecting = (args) => {
4197
+ const actualTarget = 'actualTarget';
4198
+ const target = this.grid.selectionModule[`${actualTarget}`];
4199
+ if (!isNullOrUndefined(target) && (target.classList.contains('e-treegridexpand') || target.classList.contains('e-treegridcollapse'))) {
4200
+ args.cancel = true;
4201
+ }
4185
4202
  const callBackPromise = new Deferred();
4186
4203
  this.trigger(getObject('name', args), args, (cellselectingArgs) => {
4187
4204
  callBackPromise.resolve(cellselectingArgs);
@@ -4310,6 +4327,22 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4310
4327
  if (requestType === 'reorder') {
4311
4328
  this.notify('getColumnIndex', {});
4312
4329
  }
4330
+ if (requestType === 'filterbeforeopen' && args.columnName && this.filterSettings.hierarchyMode !== 'None') {
4331
+ for (let j = 0; j < this.columns.length; j++) {
4332
+ const fields = 'field';
4333
+ if (this.columns[parseInt(j.toString(), 10)][`${fields}`] === args.columnName) {
4334
+ const taskFields = [];
4335
+ for (let i = 0; i < this.grid.currentViewData.length; i++) {
4336
+ const fieldValue = this.grid.currentViewData[parseInt(i.toString(), 10)][args.columnName];
4337
+ if (taskFields.indexOf(fieldValue) === -1) {
4338
+ taskFields.push(fieldValue);
4339
+ }
4340
+ }
4341
+ args['filterModel'].options.dataSource = taskFields.map((name) => ({ [args.columnName]: name }));
4342
+ args['filterModel'].options.filteredColumns = args['filterModel'].options.filteredColumns.filter((col) => col.field === args.columnName);
4343
+ }
4344
+ }
4345
+ }
4313
4346
  if (isRemoteData(this) && this.enableVirtualization) {
4314
4347
  if (args.requestType === 'virtualscroll') {
4315
4348
  this.query.expand('VirtualScrollingAction');