riktar / jkanban

Vanilla Javascript plugin for manage kanban boards
https://www.riccardotartaglia.it/jkanban/
Apache License 2.0
1.06k stars 296 forks source link

removeElement method is not working. #107

Closed milpas999 closed 3 years ago

milpas999 commented 3 years ago

Trying to remove item from the board, using the item id, shows error.

kanbanBoard.removeElement(selectedElementId);

where selectedElementId is the value of the data-eid of the item in board.

calling above method, shows error in console below

Uncaught TypeError: Cannot read property 'removeChild' of undefined

xscode-auto-reply[bot] commented 3 years ago

Thanks for opening a new issue. The team has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/riktar/jkanban

marcosrocha85 commented 3 years ago

Something is missing there. I have this jsfiddle pointing to the master branch and everything is fine with removeElement. Do you sure your kanbanBoard variable is set and not null?

milpas999 commented 3 years ago

Hello Guys, I have figured out the issue,

In one of my project, I was using mongoDB, whoes Ids are in form of alpha numeric character.

But in my current project, I am using Mysql, wholes ids are in integer form,

The issue occur when i pass an Integer, at an item id to remove id.

I had to change the integer value to string, and the issue resolved.

Btw Thanks for your support...

milpas999 commented 3 years ago

I am closing this issue, hoping you will do type convert in the library.

Thanks. again