-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
When multidragging items, the sortable event that's passed onSelect and onDeselect will sometimes return a list of incorrect selected indexes. An erroneous list of selected indexes will generally consist of a list of "-1" values, e.g. [-1, -1, -1, -1].
To Reproduce
Steps to reproduce the behavior:
- Go to code sandbox -- may have to refresh the sandbox browser on load for code to run.
- Select 3+ items and then multidrag anywhere in the list. Repeat this step until it displays an erroneous list of indexes in the browser e.g. [-1, -1, -1, -1]
Expected behavior
Expect the returned indexes to be correct and not full of -1 values as indexes.
Information
Versions - Look in your package.json
for this information:
sortablejs = ^1.11.2-alpha.4
@types/sortablejs = ^1.10.6 // Using javascript for sandbox demonstration. But personal project uses typescript.
Reproduction
codesandbox: https://codesandbox.io/s/sortablejs--multidrag-incorrect-indexing-dnrni?file=/src/index.js