hyperdom-sortable
Sortable lists for hyperdom.
example
var hyperdom = ;var h = hyperdomhtml;var sortable = ; { return ;} hyperdom;
api
var sortable = ; var vdom = ;
selector
- the selector to be passed tohyperdom.html
, i.e.'li'
.options
- the options to be passed tohyperdom.html
options.moveItem(fromIndex, toIndex)
- optional, called to move the item inlist
fromfromIndex
totoIndex
. If not provided, the item is moved initem
.options.onitemmoved(item, fromIndex, toIndex)
- called after an item in the list was moved.list
- the list of items from the model. Items in this list will be moved when the user sorts the list.mapFunction(item)
- a function taking an item fromlist
, and producing the corresponding vdom.