Reordering in collection repeat


#1

Hello All,
I need to apply reordering of items in collection repeat, is it possible.
just as below in the list :

Any codepen is really helpful.

Thanks,


#2

Hi @mhartington @andy I am also facing the same issue.Reordering is working with ng-repeat but when i am doing same thing using collection repeat than its not working.

here is the link which is working with the ng-repeat

http://codepen.io/anon/pen/nbCmH

and same thing with collection repeat which is not working

http://codepen.io/saurabhgarg/pen/cbqgn

Can you please tell me how it will possible.

Thanks in advance


#3

@mhartington @andy can you please help me in this problem.I have to do reordering using collection-repeat. Any alternative or solution would be helpful for me.

Thanks in advance


#4

Hey guys, sorry for not getting back to you, I was on vacation.

So for re-ordering with collection repeat…
It doesn’t seem possible right now with the current implementation…

My suggestion would be to use ion-infinite scroll and ng-repeat instead.


#5

Thanks @mhartington for your update, want to know when can we expect this to get fixed. We need to implement it and we are not getting way to implement it.

Thanks!


#6

Well you can always open an issue for this feature on our github page.


#7

@mhartington i have implemented ion-infinite scroll and ng-repeat together but for reordering it is necessary to use ion-content.
so when we use ion-infinite scroll and ion-content together they doesn’t work properly, can you suggest me any demo in which you have implemented ion-infinite scroll and ion-content (for reordering) together.

Thanks


#8

I use collection-repeat with ion-infinite-scroll on an array that needs to be ordered. I just filter the array in the controller when needed, prior to handing it off to the view:

sortedArr = $filter('orderBy')(toBeSortedArr, ['weight', 'name']);

#9

Thanks @thechrisroberts for your quick response but i have to use ion-infinite-scroll with ng-repeat, can you post your code in codepen and provide the link.


#10

Hey Ionic Team i really need to implement reordering in my collection-repeat list, please provide the solution for this.

@mhartington @andy


#11

So its still not fixed, but the issue is open for it and a codepen has been provided.


#12

Hi Ionic team, is it possible to ‘order’ a collection-repeat now , and if yes, how so ?
(the last provided link by @mhartington seems to be a related bug, but I don’t see the solution in it).

Thanks