-
Notifications
You must be signed in to change notification settings - Fork 441
orderBy filter causes wrong item to be dragged #70
Comments
How interesting. Up to this point we haven't supported However, I never though about using sortable not to reorder items, but simply to drag them between lists. In which case, Now the question becomes whether this should be supported by ui-sortable, or a new, much simpler library. |
Essentially all I'm trying to do is drag items between lists, but also For example, my objective is for both lists to maintain an order by the
On Tue, Dec 3, 2013 at 5:46 PM, CyborgMaster [email protected]:
Ben Kuhl |
Yeah, that makes a lot of sense. Sounds like a perfect use case to me. I don't have time to look at this right now, but hopefully within the next week or two I will. If you want, you can start on a pull-request yourself. |
If I get the chance to, I will. On Tue, Dec 3, 2013 at 5:51 PM, CyborgMaster [email protected]:
Ben Kuhl |
@bkuhl Here is an edited version of your plunk. Please verify that this works as intended, since I didn't have much time. As already descussed in other issues
Always prefer applying filters in the controller instead of the 'view'.
Please reopen if applicable. |
Yep, that's the functionality I was looking for... thanks!! |
Using orderBy such as
player in players | orderBy: 'first_name'
causes the wrong item to be dragged between two lists. It appears the ui-sortable list is based off of index, prior to sorting.I started to create a plunker example outside of my project, but it's not quite working, so it's not very useful. I'm experiencing this issue when 2 or more lists are connected and list items are dragged between the two.
plunker: http://plnkr.co/edit/PQlIbjTU5j6IU7uMC0yI?p=preview
It appears to be an issue with ui.sortable indexing items prior to orderBy processing.
The text was updated successfully, but these errors were encountered: