0.0.1 • Published 5 years ago

mithril-sortable v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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