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
{{ message }}
Repository navigation
Prevent moving an element after a filtered one #273
I have a list of images, where the last image can't be sorted (blocked by using the filter option). But what i can do is take another element, and move it after the filtered element. Is there any way to prevent that?
Would be cool to have a beforeEnd method, where i could check the position and revert it if its not allowed to.
This works great for a single list, but can it be done with multi lists?
Seems to be an issue when one list has no more items (except for the static one), and your trying to add a item to it.
Activity
#273: + onMove event
RubaXa commentedon Apr 15, 2015
@philipgiuliani I hope I did what you need: http://jsbin.com/tuyafe/1/edit?html,js,output
philipgiuliani commentedon Apr 15, 2015
Really cool thanks! :) Thats exactly what i needed!
RubaXa commentedon Apr 15, 2015
Excellent! Try dev-branch.
philipgiuliani commentedon Apr 15, 2015
I updated it now in my project and it works very well in my use-case! Thanks again :) Amazing work!
dmetri333 commentedon Jan 26, 2016
This works great for a single list, but can it be done with multi lists?
Seems to be an issue when one list has no more items (except for the static one), and your trying to add a item to it.
dmetri333 commentedon Jan 26, 2016
So i played around with it for a bit, and it turns out if you return -1 on "onMove" every time it will behave how i want it to.....odd
codingfriend1 commentedon Sep 14, 2016
This solution doesn't seem to work with ng-sortable.