@syncfusion/ej2-gantt 20.4.50 → 20.4.51

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.
@@ -1670,7 +1670,7 @@ class TaskProcessor extends DateProcessor {
1670
1670
  constructResourceViewDataSource(resources, data, unassignedTasks) {
1671
1671
  for (let i = 0; i < data.length; i++) {
1672
1672
  const tempData = data[i];
1673
- const child = this.parent.taskFields.child;
1673
+ var child = this.parent.taskFields.child != null ? this.parent.taskFields.child : 'Children';
1674
1674
  const resourceData = tempData && tempData[this.parent.taskFields.resourceInfo];
1675
1675
  const resourceIdMapping = this.parent.resourceFields.id;
1676
1676
  if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
@@ -24008,6 +24008,8 @@ class Edit$2 {
24008
24008
  this.addRecordAsBottom(cAddedRecord);
24009
24009
  const parentRecord = this.parent.flatData[this.parent.flatData.length - 1];
24010
24010
  this.addNewRecord(updateRecord, parentRecord);
24011
+ let source = this.parent.dataSource;
24012
+ source.push(updateRecord.taskData);
24011
24013
  }
24012
24014
  const updatedData = this.parent.currentViewData.filter((data) => {
24013
24015
  return (data.ganttProperties.taskId === updateRecord.ganttProperties.taskId &&
@@ -33963,6 +33965,13 @@ class PdfGanttPredecessor {
33963
33965
  this.parent = parent;
33964
33966
  this.pdfGantt = pdfGantt;
33965
33967
  }
33968
+ findindex(num) {
33969
+ var dataindex;
33970
+ this.parent.currentViewData.map((data, index) => { if (data.index == num) {
33971
+ dataindex = index;
33972
+ } });
33973
+ return dataindex;
33974
+ }
33966
33975
  /**
33967
33976
  * Calculate the predecesor line point and draw the predecessor
33968
33977
  *
@@ -33973,8 +33982,8 @@ class PdfGanttPredecessor {
33973
33982
  drawPredecessor(pdfGantt) {
33974
33983
  this.pdfGantt = pdfGantt;
33975
33984
  const pages = pdfGantt.result.page.section.getPages();
33976
- const parentTask = pdfGantt.taskbarCollection[this.parentIndex];
33977
- const childTask = pdfGantt.taskbarCollection[this.childIndex];
33985
+ const parentTask = pdfGantt.taskbarCollection[this.findindex(this.parentIndex)];
33986
+ const childTask = pdfGantt.taskbarCollection[this.findindex(this.childIndex)];
33978
33987
  let startPage = new PdfPage();
33979
33988
  let endPage = new PdfPage();
33980
33989
  let predecessorType = '';