Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting combined with ng-if problem #55

Open
mrft opened this issue Jul 2, 2015 · 0 comments
Open

Sorting combined with ng-if problem #55

mrft opened this issue Jul 2, 2015 · 0 comments

Comments

@mrft
Copy link

mrft commented Jul 2, 2015

Since I don't want to show all items but only the even ones, and not the first 2
I have added ng-if="( $index >= 2 ) && ( ( $index % 2 ) > 0 )"

When they are dragged, the one that is being moved ends up in the right place, but the other ones are not moved in turn to one of the positions that are visible.

The dragged item is just moved in the entire array.

But if you are not showing all items, what you would probably want is that the other items are still in one of the indexes that are "allowed by the ng-if", and that the items that are not shown will stay in the same place.

I could build some kind of fixing function that will be called at sv-on-sort, but it would be nice if it would work out-of-the-box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant