- Notifications
You must be signed in to change notification settings - Fork19
SortableJS/knockout-sortablejs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A Knockout.js binding toSortableJS.
Demo:http://rubaxa.github.io/Sortable/
Includeknockout-sortable.js
<divdata-bind="sortable: {foreach: yourObservableArray, options: {/* sortable options here */}}"><!-- optional item template here --></div><divdata-bind="draggable: {foreach: yourObservableArray, options: {/* sortable options here */}}"><!-- optional item template here --></div>
Using this bindingHandler sorts the observableArray when the user sorts the HTMLElements.
The sortable/draggable bindingHandlers supports the same syntax as Knockouts built intemplate binding except for thedata option, meaning that you could supply the name of a template or specify a separate templateEngine. The difference between the sortable and draggable handlers is that the draggable has the sortablegroup option set to{pull:'clone',put: false} and thesort option set to false by default (overridable).
- options: an object that contains settings for the underlaying sortable, ie
group,handle, events etc. - collection: if your
foreacharray is a computed then you would supply the underlaying observableArray that you would like to sort here. - manuallyHandleUpdateEvents: a boolean to turn off the change events on update that other polymer elements listen to.
npm install knockout-sortablejs
About
A Knockout.js binding to SortableJS.
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.