mithril-sortable
v0.0.1
Published
A Sortable Component for Mithril
Downloads
1
Maintainers
Readme
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
- [x] Basic Sorting
- [ ] Drag Group
- [ ] Nested Sortable
- [ ] Proper testing