RamonSmit/Nestable2

Add: custom layout wrong

Opened this issue · 0 comments

Expected behavior

When adding an item using:
$('.dd').nestable('add', {"id":1,"children":[{"id":4}]});
..it would be nice if the layout would consider a custom build function. Like when using:
buildItem(item) { ... }

Actual behavior

When adding an item, the default layout is used for a new item.

Steps to reproduce the behavior

Use a custom layout with:
buildItem(item) { ... }
Then use:
$('.dd').nestable('add', {"id":1,"children":[{"id":4}]});