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
The problem is the children.length is never less then 2. After I move an item, the element I dragged and dropped still exist in the original list, but hidden with 'display:none' style, so children.length isn't really accurate, as it also counts hidden elements.
It seems the behaviour of hiding dragged list items is only when I specify the pull option, otherwise it would remove the item being dragged. This also affects the "toArray()" method where it gets values of sortable lists, including the hidden list items which isn't desired. Is there anyway I can get this to work correctly?
I'm trying to create a list with a minimum length of 2 following the official documentations, but it doesn't seem to actually work.
The problem is the children.length is never less then 2. After I move an item, the element I dragged and dropped still exist in the original list, but hidden with 'display:none' style, so children.length isn't really accurate, as it also counts hidden elements.
It seems the behaviour of hiding dragged list items is only when I specify the pull option, otherwise it would remove the item being dragged. This also affects the "toArray()" method where it gets values of sortable lists, including the hidden list items which isn't desired. Is there anyway I can get this to work correctly?
Full Code:
http://jsbin.com/vigejoyena/1/edit?html,js,output
The text was updated successfully, but these errors were encountered: