You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! There is a bug in Add function. When we try to add new item with setting parent_id, where parent item is non-leaf element, a new item appends to the parent item and to each its descendant.
For example, there is a code from your Demo-page: https://jsfiddle.net/RomanKhomyshynets/4vogfw6o/1/
When we bind for "Add new item" button such actions if(action === 'add-item') { var newItem = { "id": ++lastId, "content": "New Item " + lastId, "parent_id":2 }; $('#nestable').nestable('add', newItem); }
Nestable inserts "New item 13" two times - as a child of Item 2 and child of Item 5.
The text was updated successfully, but these errors were encountered:
The problem is in row 244 of current version jquery.nestable.js
The solution is to change its code from tree = tree.find(listClassSelector);
onto tree = tree.find(listClassSelector+':first');
Hi! There is a bug in Add function. When we try to add new item with setting parent_id, where parent item is non-leaf element, a new item appends to the parent item and to each its descendant.
For example, there is a code from your Demo-page:
https://jsfiddle.net/RomanKhomyshynets/4vogfw6o/1/
When we bind for "Add new item" button such actions
if(action === 'add-item') { var newItem = { "id": ++lastId, "content": "New Item " + lastId, "parent_id":2 }; $('#nestable').nestable('add', newItem); }
Nestable inserts "New item 13" two times - as a child of Item 2 and child of Item 5.
The text was updated successfully, but these errors were encountered: