Droppable items data doesn't update
Hi,
I'm having an issue with droppable and dynamic items.
Say, we have a list of droppable items like the following:
<ul>
<li class="item" data-index="0">
<li class="item" data-index="1">
<li class="item" data-index="2">
</ul>
If with some script we delete the first one and recalculate the data-index values, so item with data-index="1" get data-index="0" and so on.....Well when calling ui.draggable.data('index') inside drop callback, we get the old value.
I tried to simply call .droppable() each time I remove an item from the list, but it doesn't help.
Any idea ?
Thanks !
Benjamin.