Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

react-sortable-dnd

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sortable-dnd

A React component to sort elements of any type. It also supports dropping external elements in any position.

latest
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

react-sortable-dnd

A React component to sort elements of any type. It also supports dropping external elements in any position.

Demo

Install

npm i react-sortable-dnd --save 

Usage

<Sortable onSort={components => console.log(components)}>
    <div>Apple</div>
    <div>Mango</div>
    <div>Pineapple</div>
</Sortable>

Props

PropType/OptionsDefaultDescription
classNamestringSortableOptional The class name of the component
classPlaceholderstringPlaceholderOptional The class name of the placeholder component when dragging external elements.
enabledbooleantrueOptional Enable/disable the sorting
typestring``Optional Type of the elements to sort, in case you want to restrict elements of other Sortable lists.

Event Props

PropParametersDescription
onSort(components)The sorting callback function.
onSortStart(components)Triggered when an element starts being dragged.
onDrop(e, data, index)Optional Called when an external element is dropped.

Changelog

  • 1.0.0
    • Initial release :tada:

License

ISC License

FAQs

Package last updated on 22 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts