Skip to content

Conversation

no1lov3sme
Copy link

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

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}}".
@cklemming
Copy link

cklemming commented Feb 24, 2017

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

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

Successfully merging this pull request may close these issues.

2 participants