rniemeyer / knockout-sortable

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

passing options to sortable #137

Closed kssulliv closed 9 years ago

kssulliv commented 9 years ago

I need to pass an axis 'x' option in sortable and I have been unable to figure out how to get that working. Currently I have overridden the jqueryui sortable create method but I think from you documentation there might be a better way to pass it through the 'div' in the template (I have two sortable lists on my page - one horizontal and one vertical so I need this setting to just effect one list).

Thank you

rniemeyer commented 9 years ago

You can pass any options through to the sortable using the options key like:

sortable: { data: items, options: { axis: 'x' } }

Hope that helps!