angular-sortable-view icon indicating copy to clipboard operation
angular-sortable-view copied to clipboard

Added svIndex attribute

Open no1lov3sme opened this issue 8 years ago • 1 comments

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}}".

no1lov3sme avatar Dec 29 '16 08:12 no1lov3sme

Great improvement!

Tip: To sort between paginated pages, you can use the following strategy:

  1. On sort, record the startIndex (based on the current page)
  2. Display all items in the list (remove pagination temporarily during sort)
  3. Use startIndex to grab the dragged item's index, but do not use it for the targetIndex

cklemming avatar Feb 24 '17 01:02 cklemming