0.0.8 • Published 6 years ago

rkta-sortable v0.0.8

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

RKTA Sortable

Simple sortable for react with touch support and minimal side effects

Example

<ul>
  <Sortable
    emmiterProps={{ className: 'fade' }}
    ghostProps={{ className: 'boxShadow' }}
    moveRecipient={true}
    receiverProps={{ className: 'highlight' }}
    onSortComplete={(position, nextPosition) => console.log({ position, nextPosition })}
    onSortMove={currentPosition => console.log({ currentPosition })}
  >
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
  </Sortable>
</ul>

Note

Sortable needs refs to the children DOM nodes. If you use HOC-decorated children, then you need to implement custom ref handler prop in your HOC and pass it's name as refInterface.

Sortable does not add any nodes to the DOM, except of the ghost element, which is actually a copy of the pressed element.

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago