Hello,
I made a Sortable (let's call it B) inside a Sortable (let's call it A) item element. When I drag B's items around, oldIndex property seems to be the parent's index instead of its own.
For example, if inside A2 I drag B4 and put it at index 3, the event's indexes will be
oldIndex: 2,
newIndex: 3
instead of
oldIndex: 4,
newIndex: 3
http://jsbin.com/henuzikaka/edit?html,js,output
On a side note, it seems that on the dev branch all indexes new and old, nested or not, are always 0.
Sortable — not officially supported nesting.
It might be interesting to add some sort of namespace support to avoid nesting problems.
@RubaXa would you consider merging it if it didn't add too much complexity ?
@nleclerc, @ldanet Oh, sorry, I'm all confused, try dev-branch.
Thank you, it works :+1:
Nice work man :-D
On Wed, 16 Dec 2015 at 15:56 ldanet [email protected] wrote:
Thank you, it works [image: :+1:]
—
Reply to this email directly or view it on GitHub
https://github.com/RubaXa/Sortable/issues/701#issuecomment-165132787.
Any reason this is not merged into master yet? Just noticed this issue, and the commit solves it. I think most of the referenced use cases is for nested, but independent sortables and not the unsupported sortable "tree".
+1
+1
+1
Most helpful comment
Any reason this is not merged into master yet? Just noticed this issue, and the commit solves it. I think most of the referenced use cases is for nested, but independent sortables and not the unsupported sortable "tree".