I have 2 lists which are bound to observableArrays containing the same types of objects. I want to drag an item from one list to the other list but rather than adding it as a new item I want to combine it with the item I drop it onto.
<div>
<ul data-bind="sortable: { data: customerFields, afterMove: myDropCallback, dragged: myDraggedCallback }">
<li><span data-bind="text: source"></span></li>
</ul>
</div>
<div>
<ul data-bind="sortable: { data: mapFields, afterMove: myDropCallback, dragged:myDraggedCallback }">
<li><span data-bind="text: source"></span> = <span data-bind="text: destination"></span></li>
</ul>
</div>
The objects contain a "source" and a "destination" property, when I drag the item from the first list and drop it on an item in the second list I want to call a function that I can use to set the target items "source" property to the value of the item being dropped.
Any ideas?
Im using https://github.com/rniemeyer/knockout-sortable and it appears to have a dragged event but it doesnt look like it supports what I want to do.