rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
548 stars 128 forks source link

Example for Droppable #181

Open rposener opened 7 years ago

rposener commented 7 years ago

Updated to add example for droppable, also added couple lines in draggable to support updating the data set as I noticed the draggable was not updating the data when the observable changed.

JD-Robbs commented 7 years ago

This new binding is great - thanks!

I've worked out that something like the following can be done when needing access to the target collection as well as the dropped item (where $data is the target collection):

droppable: function(droppedItem) { $component.someMethod($data, droppedItem); }
rniemeyer commented 7 years ago

@rposener - thanks! I will review and merge this when I get a chance (may be a few days).

rposener commented 7 years ago

This now also has fix for bug #186 .