Kendo nested sortables not working

270 Views Asked by At

I have three sortable lists. One of them is a grid, the other two just simple lists. The non-grid lists are nested in each other. My problem is, that I can't drag items to the nested sortable, however I can drag out from it.

I made a fiddle from the official kendo example for nested lists: https://jsfiddle.net/9jnuwjjg/1/

$("#parent").kendoSortable({
  connectWith: "#nested, #third",
  filter: ">li.list-item", 
  ignore: "#nested >li", 
  placeholder: placeholder
});

$("#nested").kendoSortable({
  connectWith: "#parent, #third",
  filter: ".list-item",
  placeholder: placeholder
});

$("#third").kendoSortable({
  connectWith: "#parent, #nested",
  filter: ".list-item",
  placeholder: placeholder
});

It has the same problem, I can't drag any item to the nested list.

Any idea would be appreciated!
Thanks!

1

There are 1 best solutions below

0
On

I removed the direct child selector that you had in the first filter field

$("#parent").kendoSortable({
  connectWith: "#nested, #third",
  filter: "li.list-item", 
  ignore: "#nested >li", 
  placeholder: placeholder
});

$("#nested").kendoSortable({
  connectWith: "#parent, #third",
  filter: ".list-item",
  placeholder: placeholder
});

$("#third").kendoSortable({
  connectWith: "#parent, #nested",
  filter: ".list-item",
  placeholder: placeholder
});