@syncfusion/ej2-gantt 20.2.38 → 20.2.39

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.
@@ -28495,6 +28495,7 @@ class RowDD$1 {
28495
28495
  const proxy = this.parent;
28496
28496
  let tempDataSource;
28497
28497
  let idx;
28498
+ const ganttFields = this.parent.taskFields;
28498
28499
  if (this.parent.dataSource instanceof DataManager) {
28499
28500
  tempDataSource = getValue('dataOperation.dataArray', this.parent);
28500
28501
  }
@@ -28503,7 +28504,12 @@ class RowDD$1 {
28503
28504
  }
28504
28505
  if (tempDataSource.length > 0 && (!isNullOrUndefined(droppedRecord) && !droppedRecord.parentItem)) {
28505
28506
  for (let i = 0; i < Object.keys(tempDataSource).length; i++) {
28506
- if (tempDataSource[i][this.parent.taskFields.child] === droppedRecord.taskData[this.parent.taskFields.child]) {
28507
+ if (!isNullOrUndefined(droppedRecord.taskData[ganttFields.child]) &&
28508
+ tempDataSource[i][ganttFields.child] === droppedRecord.taskData[ganttFields.child]) {
28509
+ idx = i;
28510
+ }
28511
+ else if (isNullOrUndefined(droppedRecord.taskData[ganttFields.child]) &&
28512
+ droppedRecord.taskData[ganttFields.id] === tempDataSource[i][ganttFields.id]) {
28507
28513
  idx = i;
28508
28514
  }
28509
28515
  }