0.0.1 • Published 5 years ago
mithril-sortable v0.0.1
Mithril Sortable
A easy to use Mithril Component that wraps awesome Sortable library.
Installation
Peer dependencies -
npm install --save sortablejs
Install Mithril Sortable
npm install --save mithril-sortable
Uses
// Sample mithril component
{
view: function() {
return m(MithrilSortable, {
wrapperTag: 'ul',
className: 'list-group',
component: 'li.list-group-item',
items: ['a', 'b', 'c'],
options: {
animation: 150,
},
onChange: (items) => {
console.log(items)
}
})
}
}
TODO
- Basic Sorting
- Drag Group
- Nested Sortable
- Proper testing
0.0.1
5 years ago