a5hik / ng-sortable

AngularJS Library for Drag and Drop, supports Sortable and Draggable. Supports Touch devices.

Home Page:http://a5hik.github.io/ng-sortable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filtering with ng-repeat causes items to disappear when you reorder

osvathrobi opened this issue · comments

I have a 'disabled' field on my items (in addition to sorting, I am allowing users to edit and delete items).

I feel like this should be possible to write:
<tr as-sortable-item ng-repeat="product in (filteredProducts = (products | filter:{disabled:'0'}))">

It seems to be working, but if any items are filtered and you start dragging things to reorder - items, that you did not intend to, disappear when you drop to finish the reordering.