riktar / jkanban

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

How to dynamically set data-eid with addELement()? #156

Closed richardklingler closed 2 years ago

richardklingler commented 2 years ago

Trying now to implement a shop category edit/sorting function with jkanban where each board represents a certain hierarchy level...

When I set the top levels in a board like this:

'item' : [ { 'id': 1, 'title':'<input type="text" value="Living">', }, I can get the the clicked item with "el.dataset.eid" and load via Ajax the next level into the second board, where I then also set the id dynamically:

kanban1.addElement('_working', { title: '<input type="text" value="' + data[i].name + '">', id: data[i].id, }); But when looking at the inspector in firefox I don't see any data-eid="x" set...so clicking on the second level items have no effect...

How can I set this data-eid so it can be used in the click handler?

thanks in advance richard

xscode-auto-reply[bot] commented 2 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

richardklingler commented 2 years ago

Looks this feature is only available in jkanban.js and not in jkanban.min.js...

Also getParentBoardID() is missing in jkanban.min.js....

Would be nice if function differences would be documented :-)

marcosrocha85 commented 2 years ago

@riktar next time you tag a new release, can you build css either?