@syncfusion/ej2-treegrid 21.1.38 → 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.
@@ -1535,9 +1535,10 @@ class Render {
1535
1535
  args.row.style.display = 'none';
1536
1536
  }
1537
1537
  }
1538
+ const dragStartData = 'dragStartData';
1538
1539
  const draggedRecord = 'draggedRecord';
1539
- if (!isNullOrUndefined(this.parent.rowDragAndDropModule) && !isNullOrUndefined(this.parent.rowDragAndDropModule[`${draggedRecord}`])
1540
- && this.parent.getContentTable().scrollHeight <= this.parent.getContent().clientHeight) {
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) {
1541
1542
  const lastRowBorder = 'lastRowBorder';
1542
1543
  const lastVisualData = this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length - 1];
1543
1544
  if (lastVisualData.uniqueID === args.data.uniqueID && !isNullOrUndefined(args.row) && !args.row.cells[0].classList.contains('e-lastrowcell')) {
@@ -4326,6 +4327,22 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4326
4327
  if (requestType === 'reorder') {
4327
4328
  this.notify('getColumnIndex', {});
4328
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
+ }
4329
4346
  if (isRemoteData(this) && this.enableVirtualization) {
4330
4347
  if (args.requestType === 'virtualscroll') {
4331
4348
  this.query.expand('VirtualScrollingAction');