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

Added svIndex attribute #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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