ValentinH / react-easy-sort

A React component to sort items in lists or grids
https://ValentinH.github.io/react-easy-sort
MIT License
160 stars 25 forks source link

Add ability to disable drag #15

Closed KantKontrol closed 3 years ago

KantKontrol commented 3 years ago

Greetings,

This PR adds the ability to disable the drag function on a list. As a user, I want to be able to edit a sortable list(a collection of inputs for example), without it dragging when clicking and typing. This can be achieved by passing the allowDrag prop, and temporarily disable drag listeners.

If you are uninterested in this idea, I can whip something up to only allow dragging from a specific component. That may be more ideal.

Please let me know, thanks.

Screen Shot 2021-06-25 at 1 21 33 PM
ValentinH commented 3 years ago

This was released as v1.1.0. Thanks for the contribution 🚀