Is there a way to get knockout-sortable to "clone" an element instead of "moving"

707 views
Skip to first unread message

Bob D.

unread,
Jul 11, 2012, 8:10:47 AM7/11/12
to knock...@googlegroups.com
I love this knockout plugin!

I'm trying to populate a list of things by dragging elements from a list that contains types of things.

For example, take the seating chart JSFiddle bellow:

Imagine that instead of student names, you have student types (freshman, sophmore, junior, senior). The available student list  would have these types and one would be able to drag a cloned element to one of the tables.

I've tried adding "options" with "helper:clone", which JqueryUI indicates is the way to go, but no luck.

Any ideas?


rpn

unread,
Jul 11, 2012, 10:33:37 AM7/11/12
to knock...@googlegroups.com
Hi Bob-
Here are a few samples that might help:
Hope this helps.  I think that the sortable binding could do a better job of enabling these scenarios.  I think that some of the code from the first sample could be integrated into the library.

Bob D.

unread,
Jul 11, 2012, 10:56:01 AM7/11/12
to knock...@googlegroups.com
Excellent! Thanks. Third example did the trick. 
Reply all
Reply to author
Forward
0 new messages