mostr / angular-ui-multi-sortable

Angular directive for using jQuery multi-sortable
MIT License
62 stars 13 forks source link

bug when filter added #7

Closed ghost closed 10 years ago

ghost commented 11 years ago

Hi, great script btw.

When filter added to ng-repeat the drop item does not match the draged item.

best show with example...

http://plnkr.co/edit/kWyPkeWpwC3WykIS1RIE

Any help would be great.

mostr commented 11 years ago

Hi, Thanks for reporting. I changed your plnkr a bit, as it had broken link to multiSortable. Here is correct version http://plnkr.co/edit/mAAZ2vhNp61AJLqd5TlU.

Regarding your main issue, it doesn't work indeed. To be honest I haven't checked it against filtered lists. Also I'm not sure how it should work when list is filtered? How to determine where given item should be moved (should it take hidden elements into account or not)?

ghost commented 11 years ago

Hi,

im not a angularjs guru, but is it possible to only move the item IF visible to the user?

thanks for the plnkr fix :)

mostr commented 10 years ago

I don't know what is your primary use case. Currently you can't sort elements that are not visible to user (user can't drag them and drop then). Closing this one. If you still have any specific use case please reopen one with detailed scenario (or send PR)