mithril-sortable

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i mithril-sortable

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

16.2 kB

Total Files

8

Last publish

Collaborators

  • shimulch