Drag&Drop of Cards causes JS Error

Hi support,
I'm using the kanban with two columns like this


let challengetypesofgroupData = new ej.data.DataManager({
url: 'challengetypesofgroupdata',
crudUrl: 'challengetypesofgroupupdate',
adaptor: new ej.data.UrlAdaptor,
});

let kanban = new ej.kanban.Kanban({
dataSource: challengetypesofgroupData,
keyField: 'Status',
sortSettings: {
sortBy: 'Index',
field: 'pos',
},
columns: [
{ headerText: 'all Challengetypes', keyField: 'all' },
{ headerText: 'Challengetypes selected', keyField: 'selected' },
],
cardSettings: {
headerField: 'Summary',
// contentField: '',
},
allowDragAndDrop: true,
});


As soon as I drag a card and start moving it, the following error occurs and the moving freezes.

TypeError: null is not an object (evaluating 'on(i,".e-content-cells").classList')

This happens with a custom generated library (at crg.syncfusion.com Version 18.4.32) but also with the
complete ej2.min.js from your cdn.
What can I do?

Regards,
Stephan



5 Replies 1 reply marked as answer

BS Balasubramanian Sattanathan Syncfusion Team January 18, 2021 11:27 AM UTC

Hi Stephan, 

Greetings from Syncfusion Support. 

We have validated your reported scenario at our end and suspect that you could face the problem due to the dataSource that you have maintained. Because we have checked the problem in the below sample with the 18.4.32 version. Since the drag and drop are working properly without any errors.  


So kindly check your provided dataSource and let us know the below details if the problem is not resolved. 
  • Try to use the upgraded version and check it.
  • Replicate the problem in the above sample.
  • Share an issue replication sample with steps.

Regards, 
Balasubramanian S


SS Stephan Schrade January 18, 2021 01:06 PM UTC

Hi support,
many thanks for your quick reply.

How can the datasource cause such an error?

My datasource ha the following reply:

[{
    "Id": 16,
    "Summary": "Ergo 1000m P(i)",
    "Status": "all",
    "pos": 1
}, {
    "Id": 45,
    "Summary": "Ergo 1000m SF Ø",
    "Status": "all",
    "pos": 2
}, {
    "Id": 46,
    "Summary": "Ergo 1000m Split 1 500m Zeit",
    "Status": "all",
    "pos": 3
}, {
    "Id": 47,
    "Summary": "Ergo 1000m Split 2 500m Zeit",
    "Status": "all",
    "pos": 4
}, {
    "Id": 14,
    "Summary": "Ergo 1000m Watt",
    "Status": "all",
    "pos": 5
}, {
    "Id": 13,
    "Summary": "Ergo 1000m Zeit",
    "Status": "all",
    "pos": 6
}, {
    "Id": 15,
    "Summary": "Ergo 1000m Ø500m",
    "Status": "all",
    "pos": 7
}, {
etc.

Is there something wrong with that?

Regards,
Stephan Schrade


BS Balasubramanian Sattanathan Syncfusion Team January 19, 2021 10:32 AM UTC

Hi Stephan, 
 
Thanks for the reply. 
 
We have checked and tried to reproduce your problem by preparing the below sample with your shared code. But unfortunately, we were unable to reproduce it at our end. Since the Kanban is working properly with the mentioned version.  
 
 
So, kindly replicate your problem in the above sample or else share an issue reproduced sample(if possible) which would help us to provide the solution at the earliest. 
 
Regards, 
Balasubramanian S


SS Stephan Schrade January 20, 2021 10:14 PM UTC

Hi support,
now I found the cause of the error.

If I put the kanban inside an e-card I do get the error described above.

<div class="e-card">
<div class="e-card-header">
<div class="e-card-header-caption">
<div class="e-card-header-title"></div>
</div>
</div>
<div class="e-card-content">
<div id="kanban"></div>
</div>
</div>

If the page is created without e-card, everything works fine.

<div id="kanban">
</div>

Regards,
Stephan


NR Nevitha Ravi Syncfusion Team January 21, 2021 01:11 PM UTC

Hi Stephan, 

Thanks for your update. 

We have validated the reported scenario “drag and drop of kanban card not works when inside the card control” at our end and confirm this as defect. We have logged the bug report which can be tracked through the following link. 

The issue fix will be included in our weekly patch release scheduled on first week of February, 2021. We would appreciate your patience until then. 

Regards, 
Nevitha 


Marked as answer
Loader.
Up arrow icon