syncfusion/ej2-javascript-ui-controls

Gantt drag and drop error

thijs4ef opened this issue ยท 2 comments

Hi! ๐Ÿ‘‹

Today I used patch-package to patch @syncfusion/ej2-gantt@19.1.66 for the project I'm working on.

In the Gantt I get an error while using the add child option and the row drag and drop feature at the same time:
gantterror
In the gif above I forked the Stackblitz gantt demo from the docs and enabled the drag and drop and contextmenu features.
Stackblitz url: https://stackblitz.com/edit/react-aklabb-dmj1wv?file=index.js

Here is the diff that solved my problem:

diff --git a/node_modules/@syncfusion/ej2-gantt/src/gantt/actions/rowdragdrop.js b/node_modules/@syncfusion/ej2-gantt/src/gantt/actions/rowdragdrop.js
index fef4c25..8095332 100644
--- a/node_modules/@syncfusion/ej2-gantt/src/gantt/actions/rowdragdrop.js
+++ b/node_modules/@syncfusion/ej2-gantt/src/gantt/actions/rowdragdrop.js
@@ -657,7 +657,7 @@ var RowDD = /** @class */ (function () {
                     }
                     childIndex = childRecords.indexOf(deletedRow);
                     flatParentData.childRecords.splice(childIndex, 1);
-                    if (!this.parent.taskFields.parentID) {
+                    if (!this.parent.taskFields.parentID && flatParentData.taskData[this.parent.taskFields.child] !== undefined) {
                         flatParentData.taskData[this.parent.taskFields.child].splice(childIndex, 1);
                     }
                     // collection for updating parent record

This issue body was partially generated by patch-package.

Hi thijs4ef,

Greetings from Syncfusion support.

We were able to replicate the issue you reported and have considered it as a bug from our side. We have logged a bug report for it. You can track its status through the below feedback link.

Feedback: https://www.syncfusion.com/feedback/26251/issue-when-drag-and-drop-after-adding-record-through-context-menu

The fix will be provided on the patch release scheduled for June 30, 2021.

We appreciate your patience until then.

Regards,
Monisha.

Hi thijs4ef,

Thank you for your patience.

The reported issue โ€œIssue when drag and drop after adding record through context menuโ€ have been fixed in version v19.2.46. Please find the release notes from the below link.

Release Notes: https://ej2.syncfusion.com/documentation/release-notes/19.2.46/?type=all#gantt

Please contact us if you require any further assistance.

Regards,
Monisha.