Open i10111pn opened 8 years ago
The items option works as expected but you should only target direct descendants of the sortable directive. Otherwise you will not have an 1to1 match between the ng- model and the DOM elements that are generated by the single child ng-repeat.
Related to #248
What do you mean by "descendants of the sortable directive"?
The items option should target direct child elements of the ui-sortable directive. The default value is '> *'. Likewise you should use a css selector that starts with '>', otherwise there will be no index matching between the DOM elements and the ng-model array.
It stop working if I'm adding ">" to css selector:
items: "categories > div.category:not(.not-sortable)"
Likewise you should use a css selector that starts with '>'
I was meaning something like this:
items: "> .category:not(.not-sortable)"
It can be solved by handle
property.
http://codepen.io/anon/pen/ZbMzgL
Thanks for answers.
Didn't realized that this was enough for your use case. I'm glad you found a solution!
Hi,
could you please check if it a bug: http://codepen.io/anon/pen/yYjjXm
I have two lists: red - can be moved white - can't be moved
So, white list is not gradable before first drag&drop. But after first drag&drop white list is becoming gradable.
Also we don't have this issue here: http://codepen.io/anon/pen/bVjeBe It different only by model.
Thanks.