1.0.11 • Published 6 years ago

react-drag-list-component v1.0.11

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

react-drag-list-component

Simple drag list component

Install

$ npm i react-drag-list-component

OR

$ yarn add react-drag-list-component

Example

render() {
  return (
    <DragList 
      list={[]}
      update={(item, old, next) => {}}
      render={(item, index) => <div key={index}>{item.name}</div>}
    />
  );
}

Drag list Props

Prop NameDescriptionRequiredDefault
listList of elements to rendertrue---
placeholderTo show placeholder draged elementsfalsetrue
updateCallback function after change position of elementtrue---
renderCallback function to render element from listtrue---
handlerTo show handler to draged elementfalsetrue

Cli-commands

Start tests:

$ yarn test

Our blogs

See Meanstack.eu - voil See Meandjs - ddosdor

License

MIT

Ready to Rock&Roll, Hell Yeah!