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
Hello, thank you for the awesome module @kamilkp !!
I have an issue, and I don't know if i'm just being stupid or if it is an actual issue: elements I move by drag and dropping do not stay on the new position, but rather go back to their previous position... I can confirm using "sv-on-sort" that both the $indexFrom and $indexTo are correct. Here's my code:
EDIT: I think this may be due to the filter I'm applying? Been beating my head for a few hours, any help would be appreciated... Here's the custom filter:
And activeStories is just an array where I put the id's of the stories I want to show.
EDIT2: After running various tests it appears the problem is that this doesn't work when the ng-repeat is iterating over a filtered array. Can anyone confirm? Any workarounds?
The text was updated successfully, but these errors were encountered:
@CharlieIGG I ran into this issue as well. You are correct that it doesn't work when the ng-repeat is iterating over a filtered array. This is because the model for the sorting and the ng-repeat are different.
A workaround would be to order the array before it is applied to the ng-repeat rather than using an orderBy filter.
Change <div ng-repeat="post in stories | selectedStories:activeStories">
To <div ng-repeat="post in activeStories">
activeStories being the ordered array
Hello, thank you for the awesome module @kamilkp !!
I have an issue, and I don't know if i'm just being stupid or if it is an actual issue:
elements I move by drag and dropping do not stay on the new position, but rather go back to their previous position... I can confirm using "sv-on-sort" that both the $indexFrom and $indexTo are correct. Here's my code:
EDIT: I think this may be due to the filter I'm applying? Been beating my head for a few hours, any help would be appreciated... Here's the custom filter:
And
activeStories
is just an array where I put the id's of the stories I want to show.EDIT2: After running various tests it appears the problem is that this doesn't work when the ng-repeat is iterating over a filtered array. Can anyone confirm? Any workarounds?
The text was updated successfully, but these errors were encountered: