angular-sortable-view
angular-sortable-view copied to clipboard
Added svIndex attribute
Attribute "sv-index" can be used for paginated list of draggable items (should be set to sv-root element). Start index should be provided.
Example: sv-index="{{currentPage > 1 ? (currentPage - 1) * elementsPerPage : 0}}"
.
Great improvement!
Tip: To sort between paginated pages, you can use the following strategy:
- On sort, record the startIndex (based on the current page)
- Display all items in the list (remove pagination temporarily during sort)
- Use startIndex to grab the dragged item's index, but do not use it for the targetIndex